Java Swing How to - Create a vertical progress bar








Question

We would like to know how to create a vertical progress bar.

Answer

//  w  w  w  .  j a  va 2 s . c o  m
import javax.swing.JProgressBar;

public class Main {
  public static void main(String[] argv) throws Exception {
    int minimum = 0;
    int maximum = 100;
    JProgressBar progress = new JProgressBar(JProgressBar.VERTICAL, minimum, maximum);
  }
}