A common behavior pattern in UI design is disabling a control while a background task is computing. Swing JComponents have a setEnabled(boolean ) call that can be used to this end. The question is: can we be friendlier to a user? Surely displaying some sort of a “busy” control is a step forward.
JXLayer and SwingX are your friends.