Not sure I understand your question but here is what I do when using the
JProgressBar:
1) As a previous post explained, if you call setValue() from the
event-handling thread, the component will not update until you release the
event-handling thread. This means that you cannot be performing your
time-consuming task on the event-handling thread (usually a bad idea anyway)
so start another thread and do the heavy lifting there.
2) If you call setValue() from any thread _other_ than the event-handling
thread, you are (to the best of my knowledge) breaking the contract that a
method call to a visible Swing component must be made from the
event-handling thread. So as you're cruising along in a different thread,
performing a time-consuming task, any calls you make to setValue() must be
put onto the event-handling thread. The easiest way to do this is to use
the SwingUtilities.invokeLater() method.
3) If you use this method often enough, eventually you will decide to
sub-class JProgressBar and provide your own thread-safe alternative to the
setValue() method.
Dan