JProgressBar not working properly
问题 So my JProgressBar I have set up doesn't work the way I want it. So whenever I run the program it just goes from 0 to 100 instantly. I tried using a ProgressMonitor , a Task, and tried a SwingWorker but nothing I tried works. Here is my program: int max = 10; for (int i = 0; i <= max; i++) { final int progress = (int)Math.round( 100.0 * ((double)i / (double)max) ); EventQueue.invokeLater(new Runnable() { @Override public void run() { try { Thread.sleep(1000); } catch (InterruptedException ex)