After many attempts trying to make a JProgressBar
work as expected, I finally became successful at achieving my goal. I had used @MadProgrammer\'s advice and used a
Kudos for creating a modeless dialog and using a worker thread, which will improve the user's experience with decreased perceived latency. Consider adding a MouseListener to the dialog when the worker starts. Display the WAIT_CURSOR
in your implementation of mouseEntered()
, and restore the default in your implementation of mouseExited()
. Remove the listener in done()
. This will make the progress and cursor visual cues coincide when the user's attention shifts to the dialog while the worker is running.