How can I update a GUI component immediately during a long-running operation?
Sandip Chitale AWT/Swing does its repaints only on what are called AWT threads. Therefore you should do the long running processing on background thread (not the thread on which you are handling callbacks from AWT/Swing controls). That way the control goes to AWT thread quickly and is able to refresh update the display. On a preemtive multitasking threading model JVMs you won't even need to mess with the priority.
Please see the following articles for details