This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Displaying data when window opens Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Displaying data when window opens" Watch "Displaying data when window opens" New topic
Author

Displaying data when window opens

Geoff Jefferson
Ranch Hand

Joined: Apr 09, 2009
Posts: 102
Hello,

I am interested in displaying data in a given component (JRadioButton) when the user opens a window such as
a JFrame. Currently I have experimented with windowActivated(), and windowOpened() with some
success. The only problem ( so far ) is that when the user changes the data in the field, then changes to
another sreen in another app ( alt-tab ) and returns, the data reverts back to the original data.

This module is being used to modify data stored on the hard drive.

What is a good way to accomplish this?

Thanks.


Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2180
    
    7
I can understand windowActivated refreshing the value, but windowOpened should only be invoked once so it should work.

Post your SSCCE demonstrating the problem.

Of course you can always remove the listener once the code has been executed once.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Displaying data when window opens