Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JInternal frame not getting updated

 
lavanya subramanian
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi guys,
i have a frame,which has two JInternal frames.the first JInternal frame has a JTable and the second JIinternal frame has some JTextfields,JTextareas and JComboboxes(all dynamically programmed).
if i select a cell in the JTable,the results corresponding to the selected item should be displayed in the second JInternal frame.
It displays,but the problem is when i go click the text in the components the results of the previous selected item clashes the new one.
once i had the same problem and corrected by constructing the components in the second JInternal frame globally ,but the textfileds and other components were not dynamic in that case.
so how to over come this problem,
any help would be appreciated,
lavanya
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Lavanya,
What do you mean by dynamically programmed?
Do you mean that the component values are set dynamically? Or that the components themselves are constantly being added and removed?
If you are just setting the values dynamically you can have your second JInternalFrame provide methods for your first JInternalFrame to call to set the values. Something like:
setComboBoxValues( String[] items, String select );
setTextFieldValue( String text );
setTextAreaValue( String text );
Regards,
Manfred.
 
lavanya subramanian
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Manfred,
i meant the components are added dynamically and not the values.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic