List of usage examples for javax.swing JProgressBar setBorderPainted
@BeanProperty(visualUpdate = true, description = "Whether the progress bar should paint its border.") public void setBorderPainted(boolean b)
borderPainted
property, which is true
if the progress bar should paint its border. 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; }