It looks like you're waiting in the event
thread, which stops all event-processing and painting in the app. What
you should use instead is a Swing Timer. You can find information about Swing Timers here:
http://java.sun.com/docs/books/tutorial/uiswing/misc/timer.html In fact, there's some code in there which is very close to what you need -- it performs an action once a second for as long as there's anything to do.
[ April 29, 2004: Message edited by: Kathy Walrath ]
Kathy Walrath<br />author, <a href="http://java.sun.com/docs/books/tutorial/" target="_blank" rel="nofollow">The Java Tutorial</a><br />editor, <a href="http://javadesktop.org" target="_blank" rel="nofollow">javadesktop.org</a>