Sophiya Behera

Greenhorn
+ Follow
since May 10, 2012
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sophiya Behera

Hi all,
I am trying a simple java program using hibernate. I am trying to add data to a table in db. While executing the program, it does not throw any error. But data is not getting updated. I think i am missing some minor things. Please help me out.


Regards
Sophiya
Hi all,
I am really confused whether swing follows MVC architecture or not. I searched in internet. But i am not satisfied with the explanations given. If somebody is clear about this topis, Please reply.


Regards
Sophiya
11 years ago
Hi Campbell/Ogranos,
I was wrong in parametrising hashmap. I was getting data from a hashmap from a class and putting into another hashmap in a different class. The source hashmap was not parametrised. Now my issue is resolved. Thanks for your help guys.



Regards
Sophiya
11 years ago
Hi Campbell,
I am already using parametrised hashmap. But still i am getting this kind of error. Please suggest.


Regards
Sophiya
11 years ago
Hi Ogranos,
Thanks for your reply. But i have already tested with instanceof operator.

System.out.println(entry.getValue() instanceof java.lang.Integer); output : false
System.out.println(entry.getValue() instanceof java.lang.String) ; compilation error

I have tried to use Integer.parseInt and intValue. It's not working. If i keep curser on entry.getValue(), then it shows Integer type. Please suggest.


Regards
Sophiya
11 years ago
Hi All,
Please refe to the below piece of code. I am trying set a value(fetched from a hash map) in a setter . It's showing "java.lang.String cannot be cast to java.lang.Integer" error. But the value i am setting is integer type and the value to be set is also inteher type. When,i tried setting a hard coded integer value, it's setting properly without any error. But when i am fetching that value from a hashmap, it's showing the above mentioned error. Please help me out in this.


Regards
Sophiya
11 years ago
The iterator code is in a different clas...

Regards
Sophiya
11 years ago
here it is...

11 years ago
Hi Swastik,
Regarding the loop termination, what you said is right. But regarding my issue, i have tried to use threading concept. The panel containing the jtextfields is declared as a customized jpanel. Please refer to the below code and suggest.



Regards
Sophiya
11 years ago
I will explain the whole scenario. I have a panel containing text fields. I am trying to update the same by fetching new values(text) from a xml file using hashmap. and i am browsing for the xml file(Jfilechooser) in the local system.
11 years ago
yes... you are absolutely right...
11 years ago
yes, entry.getValue().toString()) is to show the value in hashmap and it's displaying the value.
11 years ago
Hi all,
I am trying to update jtextfield at runtime with new values, which are fetched from a hashmap. But the jtextfield text is not updating. Please refer to the below code. Please suggest, where i am going wrong. Thanks in advance.



Regards
Sophiya
11 years ago
Hi Michael,
My issue is resolved and the reson what you have specified is quite similar to my issue. Thanks for your reply.


Regards
Sophiya
11 years ago
Hi Swastik,
My issue is resolved. I have taken the same approach, but i was going wrong while accessing array of buttons. Everytime the values in the array was getting initialised. Thnks for your code.


Regards
Sophiya
11 years ago