Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Progress Dialog in Swing

How can I make a modal JDialog without buttons appear for the duration it takes a Runnable instance to complete and have that instance update a progress bar/message on that dialog?

Clearly spaghetti code might work, but I'm looking for a clean design if one exists.

like image 870
Allain Lalonde Avatar asked Dec 22 '22 13:12

Allain Lalonde


1 Answers

You might want to look into ProgressMonitor. It automatically pops up a dialog with a progress bar if the operation is taking a long time; see How to Use Progress Monitors.

like image 161
Michael Myers Avatar answered Jan 02 '23 18:01

Michael Myers