Mega Code Archive

 
Categories / Java / Swing JFC
 

When information on the tasks progress is available, the progress bar can be made determinate

import javax.swing.JProgressBar; public class Main {   public static void main(String[] argv) throws Exception {     // Create a horizontal progress bar     int min = 0;     int max = 100;     JProgressBar progress = new JProgressBar(min, max);     int value = 33;     progress.setValue(value);     progress.setIndeterminate(false);   } }