Hi Sanjay,
Originally posted by Sanjay Joshi:
It seems to me that the GUI is not updating the status bar with the new label in time before which it starts to make the connection.
I tried doing an updateUI, even put a delay wait loop so that the gui could refresh itself, but it just doesn't work.
What do I do? Has anyone else encountered this situation?
Been there, done that. You're trying to do non-trivial work (it's taking about 10 seconds to make the connection) using the Swing event-handling
thread. Take a look at this thread topic:
Topic: JFrame not repainting when overlayed JDialog is closed . I think you're going to want to spawn a new thread (other than the Swing event-handling thread) that will make the connection. This will allow the Swing event-handling thread to refresh the GUI as you're expecting. If after looking at the referenced topic you still have questions, let me know.
Hope this helps,
George
[ February 15, 2004: Message edited by: George Marinkovich ]
Regards, George
SCJP, SCJD, SCWCD, SCBCD