Java javax.swing JProgressBar fields, constructors, methods, implement or subclass

Example usage for Java javax.swing JProgressBar fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for javax.swing JProgressBar.

The text is from its open source code.

Subclass

javax.swing.JProgressBar has subclasses.
Click this link to see all its subclasses.

Constructor

JProgressBar(int orient, int min, int max)
Creates a progress bar using the specified orientation, minimum, and maximum.
JProgressBar(int min, int max)
Creates a horizontal progress bar with the specified minimum and maximum.
JProgressBar(int orient)
Creates a progress bar with the specified orientation, which can be either SwingConstants.VERTICAL or SwingConstants.HORIZONTAL .
JProgressBar(BoundedRangeModel newModel)
Creates a horizontal progress bar that uses the specified model to hold the progress bar's data.
JProgressBar()
Creates a horizontal progress bar that displays a border but no progress string.

Method

voidaddChangeListener(ChangeListener l)
Adds the specified ChangeListener to the progress bar.
intgetMaximum()
Returns the progress bar's maximum value from the BoundedRangeModel.
intgetMinimum()
Returns the progress bar's minimum value from the BoundedRangeModel.
BoundedRangeModelgetModel()
Returns the data model used by this progress bar.
StringgetName()
Gets the name of the component.
DimensiongetSize()
Returns the size of this component in the form of a Dimension object.
StringgetString()
Returns a String representation of the current progress.
intgetValue()
Returns the progress bar's current value from the BoundedRangeModel.
booleanisIndeterminate()
Returns the value of the indeterminate property.
booleanisStringPainted()
Returns the value of the stringPainted property.
booleanisVisible()
Determines whether this component should be visible when its parent is visible.
voidputClientProperty(Object key, Object value)
Adds an arbitrary key/value "client property" to this component.
voidrepaint()
Repaints this component.
voidrevalidate()
Supports deferred automatic layout.
voidsetBackground(Color bg)
Sets the background color of this component.
voidsetBorder(Border border)
Sets the border of this component.
voidsetBorderPainted(boolean b)
Sets the borderPainted property, which is true if the progress bar should paint its border.
voidsetEnabled(boolean enabled)
Sets whether or not this component is enabled.
voidsetForeground(Color fg)
Sets the foreground color of this component.
voidsetIndeterminate(boolean newValue)
Sets the indeterminate property of the progress bar, which determines whether the progress bar is in determinate or indeterminate mode.
voidsetMaximum(int n)
Sets the progress bar's maximum value (stored in the progress bar's data model) to n.
voidsetMaximumSize(Dimension maximumSize)
Sets the maximum size of this component to a constant value.
voidsetMinimum(int n)
Sets the progress bar's minimum value (stored in the progress bar's data model) to n.
voidsetName(String name)
Sets the name of the component to the specified string.
voidsetOpaque(boolean isOpaque)
If true the component paints every pixel within its bounds.
voidsetOrientation(int newOrientation)
Sets the progress bar's orientation to newOrientation, which must be SwingConstants.VERTICAL or SwingConstants.HORIZONTAL .
voidsetPreferredSize(Dimension preferredSize)
Sets the preferred size of this component.
voidsetString(String s)
Sets the value of the progress string.
voidsetStringPainted(boolean b)
Sets the value of the stringPainted property, which determines whether the progress bar should render a progress string.
voidsetUI(ProgressBarUI ui)
Sets the look-and-feel object that renders this component.
voidsetValue(int n)
Sets the progress bar's current value to n .
voidsetVisible(boolean aFlag)
Makes the component visible or invisible.
voidupdateUI()
Resets the UI property to a value from the current look and feel.