Example usage for javax.swing JProgressBar setBorderPainted

List of usage examples for javax.swing JProgressBar setBorderPainted

Introduction

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

Prototype

@BeanProperty(visualUpdate = true, description = "Whether the progress bar should paint its border.")
public void setBorderPainted(boolean b) 

Source Link

Document

Sets the borderPainted property, which is true if the progress bar should paint its border.

Usage

From source file:Main.java

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

    JProgressBar dJProgressBar = new JProgressBar();
    dJProgressBar.setValue(100);/*from  w w w  .  j  ava  2  s.c  o m*/
    dJProgressBar.setBorderPainted(false);
    dJProgressBar.setString("Ack");
    dJProgressBar.setStringPainted(true);

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

From source file:MainClass.java

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);//ww w .  j a  va 2s .c  o  m
    dJProgressBar.setBorderPainted(false);
    dJProgressBar.setString("Ack");
    dJProgressBar.setStringPainted(true);

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

From source file:Main.java

private JProgressBar makeProgressBar(int min, int max) {
    JProgressBar progressBar1 = new JProgressBar();
    progressBar1.setMinimum(min);/*from   ww w  . j ava 2s  .com*/
    progressBar1.setMaximum(max);
    progressBar1.setStringPainted(true);
    progressBar1.setBorderPainted(true);
    getContentPane().add(progressBar1);
    return progressBar1;
}