Example usage for javax.swing JProgressBar setOrientation

List of usage examples for javax.swing JProgressBar setOrientation

Introduction

In this page you can find the example usage for javax.swing JProgressBar setOrientation.

Prototype

@BeanProperty(preferred = true, visualUpdate = true, description = "Set the progress bar's orientation.")
public void setOrientation(int newOrientation) 

Source Link

Document

Sets the progress bar's orientation to newOrientation, which must be SwingConstants.VERTICAL or SwingConstants.HORIZONTAL .

Usage

From source file:Main.java

public static void main(String[] argv) throws Exception {
    int minimum = 0;
    int maximum = 100;
    JProgressBar progress = new JProgressBar(minimum, maximum);
    progress.setOrientation(SwingConstants.HORIZONTAL);
    int newValue = 33;
    progress.setValue(newValue);/*from  w  w w.j av  a 2 s . com*/

}

From source file:Main.java

public static void main(String[] argv) throws Exception {
    int minimum = 0;
    int maximum = 100;
    JProgressBar progress = new JProgressBar(minimum, maximum);
    progress.setOrientation(SwingConstants.HORIZONTAL);
    int newValue = 33;
    progress.setValue(newValue);/*  w  w  w  .j  ava  2s  .  co  m*/
    progress.setString("value");
    System.out.println(progress.getString());
}

From source file:Main.java

public static void main(String[] argv) throws Exception {
    int minimum = 0;
    int maximum = 100;
    JProgressBar progress = new JProgressBar(minimum, maximum);
    progress.setOrientation(SwingConstants.HORIZONTAL);
    int newValue = 33;
    progress.setValue(newValue);/*from w  ww  .j  av  a  2  s  .  c  o  m*/

    System.out.println(progress.isStringPainted());
}