This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Swing InvokeLater ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Swing InvokeLater ?" Watch "Swing InvokeLater ?" New topic
Author

Swing InvokeLater ?

Jeremy Maddera
Greenhorn

Joined: May 02, 2002
Posts: 16
I am trying to have a waiting dialog appear while the application is retrieving some database information. Once the information is returned the waiting dialog needs to disapper....I have try using SwingUtilities.InvokeLater() but all I get is the Dialog with out an content..The Label waiting does not appear...What am I doing wrong?
Jeremy Maddera
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Could we see some code? How are we to know what you are doing wrong when we can't even see what you are doing?


GenRocket - Experts at Building Test Data
Jeremy Maddera
Greenhorn

Joined: May 02, 2002
Posts: 16
I Guess what I really asking is using invokeLater the right solution..In my reading of Event Thread is that when you will be updating UI from different threads then the proper way to do this with invokeLater and invokeAndWait methods calls...But when I create a runnable object that will display a dialog..I use the invokeLater to start this thread....But the UI Does not update..If I create a Thread object and start the thread that way then all works correctly......Just Confused when to use the InvokeLater and InvokeAndWait methods....
Jeremy Maddera
Greenhorn

Joined: May 02, 2002
Posts: 16
I found a solution on the sun site using the SwingWorker class..
Swing Threading
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Swing InvokeLater ?
 
Similar Threads
JQuery Dialog Box Positioning and Replacing X with Close
How is Allied Bussiness Consulting,NJ ?
ActionListener
Correct behaviour when launching a new window and getting rid of the first window
How to force JSP processing, before a dialog opens?