File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes JInternal frame not getting updated Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JInternal frame not getting updated" Watch "JInternal frame not getting updated" New topic

JInternal frame not getting updated

lavanya subramanian
Ranch Hand

Joined: Nov 03, 2000
Posts: 52
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,
Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
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 );
lavanya subramanian
Ranch Hand

Joined: Nov 03, 2000
Posts: 52
Hi Manfred,
i meant the components are added dynamically and not the values.
I agree. Here's the link:
subject: JInternal frame not getting updated
It's not a secret anymore!