JProgressBar.VERTICAL : JProgressBar « javax.swing « Java by API






JProgressBar.VERTICAL

 

import java.awt.BorderLayout;

import javax.swing.JFrame;
import javax.swing.JProgressBar;

public class MainClass {
  public static void main(String args[]) throws Exception {
    JFrame frame = new JFrame("ProgressBars");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);


    JProgressBar dJProgressBar = new JProgressBar(JProgressBar.VERTICAL);
    dJProgressBar.setValue(100);
    dJProgressBar.setBorderPainted(false);
    dJProgressBar.setString("Ack");
    dJProgressBar.setStringPainted(true);

    frame.add(dJProgressBar, BorderLayout.WEST);
    frame.setSize(300, 200);
    frame.setVisible(true);
  }

}

           
         
  








Related examples in the same category

1.new JProgressBar(int min, int max)
2.new JProgressBar(int orient, int min, int max)
3.JProgressBar: addChangeListener(ChangeListener l)
4.JProgressBar: getMaximum()
5.JProgressBar: getMinimum()
6.JProgressBar: getValue()
7.JProgressBar: setBorder(Border b)
8.JProgressBar: setBorderPainted(boolean b)
9.JProgressBar: setIndeterminate(boolean newValue)
10.JProgressBar: setMaximum(int n)
11.JProgressBar: setMinimum(int n)
12.JProgressBar: setStringPainted(boolean b)
13.JProgressBar: setValue(int v)