Updating Components in a JInternalFrame
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Keith_Veleba
Posted On:   Friday, January 25, 2002 02:05 PM

I didn't see any reference to this in a forum search, so forgive me if this is a repeat. I'm using a JInternalFrame/JDesktopPane in an MDI-like app. I have one palette frame which contains a JPanel and it contains a JLabel being used as a status bar. I'm catching the componentResized event of the frame, and using it to get the text for the status bar. I know this part is working as I'm dumping getText of the JLabel to the console after it's been set with setText(), but it will not update in the window with the new text. I am using a Runnable and passing it to SwingUtilities.invokeLater() to properly handle the update of the component. Any ideas what I may be doing wrong? Thanks,    More>>

I didn't see any reference to this in a forum search, so forgive me if this is a repeat.

I'm using a JInternalFrame/JDesktopPane in an MDI-like app.

I have one palette frame which contains a JPanel and it contains a JLabel being used as a status bar.

I'm catching the componentResized event of the frame, and using it to get the text for the status bar. I know this part is working as I'm dumping getText of the JLabel to the console after it's been set with setText(), but it will not update in the window with the new text.

I am using a Runnable and passing it to SwingUtilities.invokeLater() to properly handle the update of the component.

Any ideas what I may be doing wrong?

Thanks,
Keith

   <<Less

Re: Updating Components in a JInternalFrame

Posted By:   Keith_Veleba  
Posted On:   Monday, January 28, 2002 08:25 AM

For those of you who were curious, it was a completely stupid mistake. I had multiple instances of the panel component, and was calling the method on the wrong reference.

Everything's working fine now.
About | Sitemap | Contact