This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.swing
class JProgressBar

java.lang.Object extended by java.awt.Component extended by java.awt.Container extended by javax.swing.JComponent extended by javax.swing.JProgressBar
All Implemented Interfaces:
MenuContainer, ImageObserver, Serializable, Accessible, SwingConstants, TransferHandler.HasGetTransferHandler

Most common ways to construct:

JProgressBar progressBar = new JProgressBar();

Based on 58 examples

 

JProgressBar progressBar = new JProgressBar(0, 100);

Based on 55 examples


public class JProgressBar
extends JComponent
implements SwingConstants, Accessible

A component that visually displays the progress of some task. As the task progresses towards completion, the progress bar displays the task's percentage of completion. This percentage is typically represented visually by a rectangle which starts out empty and gradually becomes filled in as the task progresses. In addition, the progress bar can display a textual representation of this percentage.

{@code JProgressBar} uses a {@code BoundedRangeModel} as its data model, with the {@code value} property representing the "current" state of the task, and the {@code minimum} and {@code maximum} properties representing the beginning and end points, respectively.

To indicate that a task of unknown length is executing, you can put a progress bar into indeterminate mode. While the bar is in indeterminate mode, it animates constantly to show that work is occurring. As soon as you can determine the task's length and amount of progress, you should update the progress bar's value and switch it back to determinate mode.

Here is an example of creating a progress bar, where task is an object (representing some piece of work) which returns information about the progress of the task:

progressBar = new JProgressBar(0, task.getLengthOfTask());
progressBar.setValue(0);
progressBar.setStringPainted(true);
Here is an example of querying the current state of the task, and using the returned value to update the progress bar:
progressBar.setValue(task.getCurrent());
Here is an example of putting a progress bar into indeterminate mode, and then switching back to determinate mode once the length of the task is known:
progressBar = new JProgressBar();
...//when the task of (initially) unknown length begins:
progressBar.setIndeterminate(true);
...//do some work; get length of task...
progressBar.setMaximum(newLength);
progressBar.setValue(newValue);
progressBar.setIndeterminate(false);

For complete examples and further documentation see How to Monitor Progress, a section in The Java Tutorial.

Warning: Swing is not thread safe. For more information see Swing's Threading Policy.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeansTM has been added to the java.beans package. Please see {@link java.beans.XMLEncoder}.


Nested Class Summary
protected class

           This class implements accessibility support for the JProgressBar class.
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
   
Field Summary
protected transient ChangeEvent changeEvent
          Only one ChangeEvent is needed per instance since the event's only interesting property is the immutable source, which is the progress bar.
protected ChangeListener changeListener
          Listens for change events sent by the progress bar's model, redispatching them to change-event listeners registered upon this progress bar.
protected BoundedRangeModel model
          The object that holds the data for the progress bar.
protected int orientation
          Whether the progress bar is horizontal or vertical.
protected boolean paintBorder
          Whether to display a border around the progress bar.
protected boolean paintString
          Whether to display a string of text on the progress bar.
protected String progressString
          An optional string that can be displayed on the progress bar.
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary

          Creates a horizontal progress bar that displays a border but no progress string.

          Creates a horizontal progress bar that uses the specified model to hold the progress bar's data.
JProgressBar(int orient)

          Creates a progress bar with the specified orientation, which can be either or .
JProgressBar(int min, int max)

          Creates a horizontal progress bar with the specified minimum and maximum.
JProgressBar(int orient, int min, int max)

          Creates a progress bar using the specified orientation, minimum, and maximum.
 
Method Summary
 void

          Adds the specified ChangeListener to the progress bar.
protected ChangeListener

          Subclasses that want to handle change events from the model differently can override this to return an instance of a custom ChangeListener implementation.
protected void

          Send a , whose source is this , to all s that have registered interest in s.
 AccessibleContext

          Gets the AccessibleContext associated with this JProgressBar.
 ChangeListener[]

          Returns an array of all the ChangeListeners added to this progress bar with addChangeListener.
 int

          Returns the progress bar's value from the BoundedRangeModel.
 int

          Returns the progress bar's value from the BoundedRangeModel.
 BoundedRangeModel

          Returns the data model used by this progress bar.
 int

          Returns or , depending on the orientation of the progress bar.
 double

          Returns the percent complete for the progress bar.
 String

          Returns a representation of the current progress.
 ProgressBarUI

          Returns the look-and-feel object that renders this component.
 String

          Returns the name of the look-and-feel class that renders this component.
 int

          Returns the progress bar's current from the BoundedRangeModel.
 boolean

          Returns the borderPainted property.
 boolean

          Returns the value of the indeterminate property.
 boolean

          Returns the value of the stringPainted property.
protected void

          Paints the progress bar's border if the borderPainted property is true.
protected String

          Returns a string representation of this JProgressBar.
 void

          Removes a ChangeListener from the progress bar.
 void
setBorderPainted(boolean b)

          Sets the borderPainted property, which is true if the progress bar should paint its border.
 void
setIndeterminate(boolean newValue)

          Sets the indeterminate property of the progress bar, which determines whether the progress bar is in determinate or indeterminate mode.
 void
setMaximum(int n)

          Sets the progress bar's maximum value (stored in the progress bar's data model) to n.
 void
setMinimum(int n)

          Sets the progress bar's minimum value (stored in the progress bar's data model) to n.
 void

          Sets the data model used by the JProgressBar.
 void
setOrientation(int newOrientation)

          Sets the progress bar's orientation to newOrientation, which must be or .
 void

          Sets the value of the progress string.
 void
setStringPainted(boolean b)

          Sets the value of the stringPainted property, which determines whether the progress bar should render a progress string.
 void

          Sets the look-and-feel object that renders this component.
 void
setValue(int n)

          Sets the progress bar's current value to .
 void

          Resets the UI property to a value from the current look and feel.
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

changeEvent

protected transient ChangeEvent changeEvent
Only one ChangeEvent is needed per instance since the event's only interesting property is the immutable source, which is the progress bar. The event is lazily created the first time that an event notification is fired.

changeListener

protected ChangeListener changeListener
Listens for change events sent by the progress bar's model, redispatching them to change-event listeners registered upon this progress bar.

model

protected BoundedRangeModel model
The object that holds the data for the progress bar.

orientation

protected int orientation
Whether the progress bar is horizontal or vertical. The default is HORIZONTAL.

paintBorder

protected boolean paintBorder
Whether to display a border around the progress bar. The default is true.

paintString

protected boolean paintString
Whether to display a string of text on the progress bar. The default is false. Setting this to true causes a textual display of the progress to be rendered on the progress bar. If the progressString is null, the percentage of completion is displayed on the progress bar. Otherwise, the progressString is rendered on the progress bar.

progressString

protected String progressString
An optional string that can be displayed on the progress bar. The default is null. Setting this to a non-null value does not imply that the string will be displayed. To display the string, {@code paintString} must be {@code true}.
Constructor Detail

JProgressBar

public JProgressBar()
Creates a horizontal progress bar that displays a border but no progress string. The initial and minimum values are 0, and the maximum is 100.


JProgressBar

public JProgressBar(BoundedRangeModel newModel)
Creates a horizontal progress bar that uses the specified model to hold the progress bar's data. By default, a border is painted but a progress string is not.

Parameters:
newModel - the data model for the progress bar

JProgressBar

public JProgressBar(int orient)
Creates a progress bar with the specified orientation, which can be either {@code SwingConstants.VERTICAL} or {@code SwingConstants.HORIZONTAL}. By default, a border is painted but a progress string is not. The initial and minimum values are 0, and the maximum is 100.

Parameters:
orient - the desired orientation of the progress bar

JProgressBar

public JProgressBar(int min,
                    int max)
Creates a horizontal progress bar with the specified minimum and maximum. Sets the initial value of the progress bar to the specified minimum. By default, a border is painted but a progress string is not.

The BoundedRangeModel that holds the progress bar's data handles any issues that may arise from improperly setting the minimum, initial, and maximum values on the progress bar. See the {@code BoundedRangeModel} documentation for details.

Parameters:
min - the minimum value of the progress bar
max - the maximum value of the progress bar

JProgressBar

public JProgressBar(int orient,
                    int min,
                    int max)
Creates a progress bar using the specified orientation, minimum, and maximum. By default, a border is painted but a progress string is not. Sets the initial value of the progress bar to the specified minimum.

The BoundedRangeModel that holds the progress bar's data handles any issues that may arise from improperly setting the minimum, initial, and maximum values on the progress bar. See the {@code BoundedRangeModel} documentation for details.

Parameters:
orient - the desired orientation of the progress bar
min - the minimum value of the progress bar
max - the maximum value of the progress bar
Method Detail

addChangeListener

public void addChangeListener(ChangeListener l)
Adds the specified ChangeListener to the progress bar.

Parameters:
l - the ChangeListener to add

createChangeListener

protected ChangeListener createChangeListener()
Subclasses that want to handle change events from the model differently can override this to return an instance of a custom ChangeListener implementation. The default {@code ChangeListener} simply calls the {@code fireStateChanged} method to forward {@code ChangeEvent}s to the {@code ChangeListener}s that have been added directly to the progress bar.


fireStateChanged

protected void fireStateChanged()
Send a {@code ChangeEvent}, whose source is this {@code JProgressBar}, to all {@code ChangeListener}s that have registered interest in {@code ChangeEvent}s. This method is called each time a {@code ChangeEvent} is received from the model.

The event instance is created if necessary, and stored in {@code changeEvent}.


getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this JProgressBar. For progress bars, the AccessibleContext takes the form of an AccessibleJProgressBar. A new AccessibleJProgressBar instance is created if necessary.

Overrides:
getAccessibleContext in class JComponent
Returns:
an AccessibleJProgressBar that serves as the AccessibleContext of this JProgressBar

getChangeListeners

public ChangeListener[] getChangeListeners()
Returns an array of all the ChangeListeners added to this progress bar with addChangeListener.

Returns:
all of the ChangeListeners added or an empty array if no listeners have been added

getMaximum

public int getMaximum()
Returns the progress bar's {@code maximum} value from the BoundedRangeModel.

Returns:
the progress bar's maximum value

getMinimum

public int getMinimum()
Returns the progress bar's {@code minimum} value from the BoundedRangeModel.

Returns:
the progress bar's minimum value

getModel

public BoundedRangeModel getModel()
Returns the data model used by this progress bar.

Returns:
the BoundedRangeModel currently in use

getOrientation

public int getOrientation()
Returns {@code SwingConstants.VERTICAL} or {@code SwingConstants.HORIZONTAL}, depending on the orientation of the progress bar. The default orientation is {@code SwingConstants.HORIZONTAL}.

Returns:
HORIZONTAL or VERTICAL

getPercentComplete

public double getPercentComplete()
Returns the percent complete for the progress bar. Note that this number is between 0.0 and 1.0.

Returns:
the percent complete for this progress bar

getString

public String getString()
Returns a {@code String} representation of the current progress. By default, this returns a simple percentage {@code String} based on the value returned from {@code getPercentComplete}. An example would be the "42%". You can change this by calling {@code setString}.

Returns:
the value of the progress string, or a simple percentage string if the progress string is {@code null}

getUI

public ProgressBarUI getUI()
Returns the look-and-feel object that renders this component.

Returns:
the ProgressBarUI object that renders this component

getUIClassID

public String getUIClassID()
Returns the name of the look-and-feel class that renders this component.

Overrides:
getUIClassID in class JComponent
Returns:
the string "ProgressBarUI"

getValue

public int getValue()
Returns the progress bar's current {@code value} from the BoundedRangeModel. The value is always between the minimum and maximum values, inclusive.

Returns:
the current value of the progress bar

isBorderPainted

public boolean isBorderPainted()
Returns the borderPainted property.

Returns:
the value of the borderPainted property

isIndeterminate

public boolean isIndeterminate()
Returns the value of the indeterminate property.

Returns:
the value of the indeterminate property

isStringPainted

public boolean isStringPainted()
Returns the value of the stringPainted property.

Returns:
the value of the stringPainted property

paintBorder

protected void paintBorder(Graphics g)
Paints the progress bar's border if the borderPainted property is true.

Overrides:
paintBorder in class JComponent
Parameters:
g - the Graphics context within which to paint the border

paramString

protected String paramString()
Returns a string representation of this JProgressBar. This method is intended to be used only for debugging purposes. The content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.

Overrides:
paramString in class JComponent
Returns:
a string representation of this JProgressBar

removeChangeListener

public void removeChangeListener(ChangeListener l)
Removes a ChangeListener from the progress bar.

Parameters:
l - the ChangeListener to remove

setBorderPainted

public void setBorderPainted(boolean b)
Sets the borderPainted property, which is true if the progress bar should paint its border. The default value for this property is true. Some look and feels might not implement painted borders; they will ignore this property.

Parameters:
b - true if the progress bar should paint its border; otherwise, false

setIndeterminate

public void setIndeterminate(boolean newValue)
Sets the indeterminate property of the progress bar, which determines whether the progress bar is in determinate or indeterminate mode. An indeterminate progress bar continuously displays animation indicating that an operation of unknown length is occurring. By default, this property is false. Some look and feels might not support indeterminate progress bars; they will ignore this property.

See How to Monitor Progress for examples of using indeterminate progress bars.

Parameters:
newValue - true if the progress bar should change to indeterminate mode; false if it should revert to normal.

setMaximum

public void setMaximum(int n)
Sets the progress bar's maximum value (stored in the progress bar's data model) to n.

The underlying BoundedRangeModel handles any mathematical issues arising from assigning faulty values. See the {@code BoundedRangeModel} documentation for details.

If the maximum value is different from the previous maximum, all change listeners are notified.

Parameters:
n - the new maximum

setMinimum

public void setMinimum(int n)
Sets the progress bar's minimum value (stored in the progress bar's data model) to n.

The data model (a BoundedRangeModel instance) handles any mathematical issues arising from assigning faulty values. See the {@code BoundedRangeModel} documentation for details.

If the minimum value is different from the previous minimum, all change listeners are notified.

Parameters:
n - the new minimum

setModel

public void setModel(BoundedRangeModel newModel)
Sets the data model used by the JProgressBar. Note that the {@code BoundedRangeModel}'s {@code extent} is not used, and is set to {@code 0}.

Parameters:
newModel - the BoundedRangeModel to use

setOrientation

public void setOrientation(int newOrientation)
Sets the progress bar's orientation to newOrientation, which must be {@code SwingConstants.VERTICAL} or {@code SwingConstants.HORIZONTAL}. The default orientation is {@code SwingConstants.HORIZONTAL}.

Parameters:
newOrientation - HORIZONTAL or VERTICAL

setString

public void setString(String s)
Sets the value of the progress string. By default, this string is null, implying the built-in behavior of using a simple percent string. If you have provided a custom progress string and want to revert to the built-in behavior, set the string back to null.

The progress string is painted only if the isStringPainted method returns true.

Parameters:
s - the value of the progress string

setStringPainted

public void setStringPainted(boolean b)
Sets the value of the stringPainted property, which determines whether the progress bar should render a progress string. The default is false, meaning no string is painted. Some look and feels might not support progress strings or might support them only when the progress bar is in determinate mode.

Parameters:
b - true if the progress bar should render a string

setUI

public void setUI(ProgressBarUI ui)
Sets the look-and-feel object that renders this component.

Parameters:
ui - a ProgressBarUI object

setValue

public void setValue(int n)
Sets the progress bar's current value to {@code n}. This method forwards the new value to the model.

The data model (an instance of {@code BoundedRangeModel}) handles any mathematical issues arising from assigning faulty values. See the {@code BoundedRangeModel} documentation for details.

If the new value is different from the previous value, all change listeners are notified.

Parameters:
n - the new value

updateUI

public void updateUI()
Resets the UI property to a value from the current look and feel.

Overrides:
updateUI in class JComponent


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.