I recently needed to create a progress dialog in a Java Swing application.

I came across this snippet which was very helpful. The main gist of this being that jDialog’s setVisible method is blocking, hence the need to run it in a seperate thread:

Thread t = new Thread(new Runnable() {
  public void run() {

The final result looks very nice (especially with a nice lookandfeel).

jDialog progress bar



Matt Reid

Lead Software Architect. Java, Node.js and TypeScript enthusiast.

drei01 Matthew_Reid