Java Swing Tutorial - Java JProgressBar(int min, int max) Constructor








Syntax

JProgressBar(int min, int max) constructor from JProgressBar has the following syntax.

public JProgressBar(int min,   int max)

Example

In the following code shows how to use JProgressBar.JProgressBar(int min, int max) constructor.

import javax.swing.JProgressBar;
/*from  w  w  w.  ja  v  a 2s  . co  m*/
public class Main {
  public static void main(String[] argv) throws Exception {
    int minimum = 0;
    int maximum = 100;
    JProgressBar progress = new JProgressBar(minimum, maximum);

  }
}