Thursday, March 5, 2009

JProgressBar Constructors

These are five different constructors for JProgressBar:

public JProgressBar()
JProgressBar aJProgressBar = new JProgressBar();

public JProgressBar(int orientation)
JProgressBar aJProgressBar = new JProgressBar(JProgressBar.VERTICAL);
JProgressBar bJProgressBar = new JProgressBar(JProgressBar.HORIZONTAL);

public JProgressBar(int minimum, int maximum)
JProgressBar aJProgressBar = new JProgressBar(0, 500);

public JProgressBar(int orientation, int minimum, int maximum)
JProgressBar aJProgressBar = new JProgressBar(JProgressBar.VERTICAL, 0, 1000);

public JProgressBar(BoundedRangeModel model)
// Data model, initial value 0, range 0-250, and extent of 0
DefaultBoundedRangeModel model = new DefaultBoundedRangeModel(0, 0, 0, 250);
JProgressBar aJProgressBar = new JProgressBar(model);

No comments:

Post a Comment