javax.swing

Class JSlider

Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable, SwingConstants

public class JSlider
extends JComponent
implements SwingConstants, Accessible, ImageObserver, MenuContainer, Serializable

The JSlider is a Swing component that allows selection of a value within a range by adjusting a thumb in a track. The values for the minimum, maximum, extent and value are stored in a DefaultBoundedRangeModel.

JSliders have the following properties:

Property Stored in Bound?
extent model no
inverted slider yes
labelTable slider yes
majorTickSpacing slider yes
maximum model no
minimum model no
minorTickSpacing slider yes
model slider yes
orientation slider yes
paintLabels slider yes
paintTicks slider yes
snapToTicks slider no
value model no
valueIsAdjusting model no

The various behavioral aspects of these properties follows:

See Also:
Serialized Form

Nested Class Summary

protected class
JSlider.AccessibleJSlider
DOCUMENT ME!

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.BltBufferStrategy, Component.FlipBufferStrategy

Field Summary

protected ChangeEvent
changeEvent
The ChangeEvent that is passed to all listeners of this slider.
protected ChangeListener
changeListener
The ChangeListener that listens to the model.
protected int
majorTickSpacing
The space between major ticks.
protected int
minorTickSpacing
The space between minor ticks.
protected int
orientation
The orientation of the slider.
protected BoundedRangeModel
sliderModel
The model used to describe the slider.
protected boolean
snapToTicks
Whether the slider snaps its values to ticks.

Fields inherited from class javax.swing.JComponent

TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW, accessibleContext, listenerList, ui

Fields inherited from class java.awt.Component

BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT

Fields inherited from interface java.awt.image.ImageObserver

ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH

Fields inherited from interface javax.swing.SwingConstants

BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST

Constructor Summary

JSlider()
Creates a new horizontal JSlider object with a minimum of 0, a maximum of 100, and a value of 50.
JSlider(int orientation)
Creates a new JSlider object with the given orientation and a minimum of 0, a maximum of 100, and a value of 50.
JSlider(int minimum, int maximum)
Creates a new horizontal JSlider object with the given maximum and minimum and a value that is halfway between the minimum and the maximum.
JSlider(int minimum, int maximum, int value)
Creates a new horizontal JSlider object with the given minimum, maximum, and value.
JSlider(int orientation, int minimum, int maximum, int value)
Creates a new JSlider object with the given orientation, minimum, maximum, and value.
JSlider(BoundedRangeModel model)
Creates a new horizontal JSlider object with the given model.

Method Summary

void
addChangeListener(ChangeListener listener)
This method registers a listener to this slider.
protected ChangeListener
createChangeListener()
Creates a ChangeListener for this Slider.
Hashtable
createStandardLabels(int increment)
Creates a hashtable of (Integer, JLabel) pairs that can be used as a label table for this slider.
Hashtable
createStandardLabels(int increment, int start)
Creates a hashtable of (Integer, JLabel) pairs that can be used as a label table for this slider.
protected void
fireStateChanged()
This method is called whenever the model fires a ChangeEvent.
AccessibleContext
getAccessibleContext()
DOCUMENT ME!
ChangeListener[]
getChangeListeners()
This method returns an array of all ChangeListeners listening to this slider.
int
getExtent()
This method returns the extent value for this slider.
boolean
getInverted()
This method returns whether the slider is inverted.
Dictionary
getLabelTable()
This method returns the label table for this slider.
int
getMajorTickSpacing()
This method returns the amount of units between each major tick mark.
int
getMaximum()
This method returns the maximum value of the slider.
int
getMinimum()
This method returns the minimum value of the slider.
int
getMinorTickSpacing()
This method returns the amount of units between each minor tick mark.
BoundedRangeModel
getModel()
This method returns the model of the slider.
int
getOrientation()
This method returns the slider orientation.
boolean
getPaintLabels()
This method returns whether labels will be painted.
boolean
getPaintTicks()
This method returns whether the slider will paint its tick marks.
boolean
getPaintTrack()
This method returns whether the track will be painted.
boolean
getSnapToTicks()
This method returns whether this slider is snapping to ticks.
SliderUI
getUI()
This method returns the slider's UI delegate.
String
getUIClassID()
This method returns a name to identify which look and feel class will be the UI delegate for the slider.
int
getValue()
This method returns the current value of the slider.
boolean
getValueIsAdjusting()
This method returns this slider's isAdjusting value which is true if the thumb is being dragged.
protected String
paramString()
This method is used primarily for debugging purposes and returns a string that can be used to represent this slider.
void
removeChangeListener(ChangeListener listener)
This method removes a listener from this slider.
void
setExtent(int extent)
This method sets the extent value for this slider.
void
setInverted(boolean inverted)
This method changes the "inverted" property for this slider.Horizontal sliders that are not inverted will have the minimums on the left.
void
setLabelTable(Dictionary table)
This method changes the "labelTable" property of this slider.
void
setMajorTickSpacing(int spacing)
This method changes the "majorTickSpacing" property for this slider.
void
setMaximum(int maximum)
This method sets the maximum value of the slider.
void
setMinimum(int minimum)
This method sets the minimum value of the slider.
void
setMinorTickSpacing(int spacing)
This method changes the "minorTickSpacing" property for this slider.
void
setModel(BoundedRangeModel model)
This method changes the "model" property.
void
setOrientation(int orientation)
This method changes the "orientation" property of this slider.
void
setPaintLabels(boolean paint)
This method changes the "paintLabels" property.
void
setPaintTicks(boolean paint)
This method changes the "paintTicks" property for this slider.
void
setPaintTrack(boolean paint)
Sets the flag that controls whether or not the track is painted, and sends a PropertyChangeEvent (for the "paintTrack" property) to all registered listeners.
void
setSnapToTicks(boolean snap)
This method sets whether this slider will snap to ticks.
void
setUI(SliderUI ui)
This method sets the slider's UI delegate.
void
setValue(int value)
This method sets the value of the slider.
void
setValueIsAdjusting(boolean adjusting)
This method sets the isAdjusting value for the slider.
protected void
updateLabelUIs()
This method is called to reset UI delegates for the labels in the labelTable to a default for the current look and feel.
void
updateUI()
This method sets this slider's UI to the UIManager's default for the current look and feel.

Methods inherited from class javax.swing.JComponent

addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, 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, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, swapComponents, 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, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, 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, 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, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFocusable, isFontSet, isForegroundSet, isLightweight, isOpaque, 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, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFocusable, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, 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 Details

changeEvent

protected ChangeEvent changeEvent
The ChangeEvent that is passed to all listeners of this slider.

changeListener

protected ChangeListener changeListener
The ChangeListener that listens to the model.

majorTickSpacing

protected int majorTickSpacing
The space between major ticks.

minorTickSpacing

protected int minorTickSpacing
The space between minor ticks.

orientation

protected int orientation
The orientation of the slider.

sliderModel

protected BoundedRangeModel sliderModel
The model used to describe the slider.

snapToTicks

protected boolean snapToTicks
Whether the slider snaps its values to ticks.

Constructor Details

JSlider

public JSlider()
Creates a new horizontal JSlider object with a minimum of 0, a maximum of 100, and a value of 50.

JSlider

public JSlider(int orientation)
Creates a new JSlider object with the given orientation and a minimum of 0, a maximum of 100, and a value of 50.
Parameters:
orientation - The orientation of the slider (SwingConstants.HORIZONTAL or SwingConstants.VERTICAL).
Throws:
IllegalArgumentException - if orientation is not one of the specified values.

JSlider

public JSlider(int minimum,
               int maximum)
Creates a new horizontal JSlider object with the given maximum and minimum and a value that is halfway between the minimum and the maximum.
Parameters:
minimum - The minimum value of the JSlider.
maximum - The maximum value of the JSlider.

JSlider

public JSlider(int minimum,
               int maximum,
               int value)
Creates a new horizontal JSlider object with the given minimum, maximum, and value.
Parameters:
minimum - The minimum value of the JSlider.
maximum - The maximum value of the JSlider.
value - The initial value of the JSlider.

JSlider

public JSlider(int orientation,
               int minimum,
               int maximum,
               int value)
Creates a new JSlider object with the given orientation, minimum, maximum, and value.
Parameters:
orientation - The orientation of the slider (SwingConstants.HORIZONTAL or SwingConstants.VERTICAL).
minimum - The minimum value of the JSlider.
maximum - The maximum value of the JSlider.
value - The initial value of the JSlider.
Throws:
IllegalArgumentException - if orientation is not one of the specified values.

JSlider

public JSlider(BoundedRangeModel model)
Creates a new horizontal JSlider object with the given model.
Parameters:
model - The model (null not permitted).
Throws:
NullPointerException - if model is null.

Method Details

addChangeListener

public void addChangeListener(ChangeListener listener)
This method registers a listener to this slider. The listener will be informed of new ChangeEvents.
Parameters:
listener - The listener to register.

createChangeListener

protected ChangeListener createChangeListener()
Creates a ChangeListener for this Slider.
Returns:
A new ChangeListener.

createStandardLabels

public Hashtable createStandardLabels(int increment)
Creates a hashtable of (Integer, JLabel) pairs that can be used as a label table for this slider. The labels will start from the sliders minimum and increase by the increment. Each label will have a text string indicating their integer value.
Parameters:
increment - The increment between labels (must be > 0).
Returns:
A hashtable with the labels and their keys.
Throws:
IllegalArgumentException - if increment is not greater than zero.

createStandardLabels

public Hashtable createStandardLabels(int increment,
                                      int start)
Creates a hashtable of (Integer, JLabel) pairs that can be used as a label table for this slider. The labels will start from the given start value and increase by the increment. Each label will have a text string indicating its integer value.
Parameters:
increment - The increment between labels (must be > 0).
start - The value to start from.
Returns:
A hashtable with the labels and their keys.
Throws:
IllegalArgumentException - if increment is not greater than zero, or start is not within the range of the model.

fireStateChanged

protected void fireStateChanged()
This method is called whenever the model fires a ChangeEvent. It should propagate the ChangeEvent to its listeners with a new ChangeEvent that identifies the slider as the source.

getAccessibleContext

public AccessibleContext getAccessibleContext()
DOCUMENT ME!
Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in interface JComponent
Returns:
DOCUMENT ME!

getChangeListeners

public ChangeListener[] getChangeListeners()
This method returns an array of all ChangeListeners listening to this slider.
Returns:
An array of ChangeListeners listening to this slider.

getExtent

public int getExtent()
This method returns the extent value for this slider.
Returns:
The extent value for this slider.

getInverted

public boolean getInverted()
This method returns whether the slider is inverted. Horizontal sliders that are not inverted will have the minimums on the left. If they are inverted, the minimums will be on the right. Vertical sliders that are not inverted will have the minimums at the bottom. If they are inverted, the minimums will be at the top.
Returns:
Whether this slider is inverted.

getLabelTable

public Dictionary getLabelTable()
This method returns the label table for this slider.
Returns:
The label table for this slider.

getMajorTickSpacing

public int getMajorTickSpacing()
This method returns the amount of units between each major tick mark.
Returns:
The amount of units between each major tick mark.

getMaximum

public int getMaximum()
This method returns the maximum value of the slider.
Returns:
The maximum value of the slider.

getMinimum

public int getMinimum()
This method returns the minimum value of the slider.
Returns:
The minimum value of the slider.

getMinorTickSpacing

public int getMinorTickSpacing()
This method returns the amount of units between each minor tick mark.
Returns:
The amount of units between each minor tick mark.

getModel

public BoundedRangeModel getModel()
This method returns the model of the slider.
Returns:
The slider's model.

getOrientation

public int getOrientation()
This method returns the slider orientation.
Returns:
The orientation of the slider.

getPaintLabels

public boolean getPaintLabels()
This method returns whether labels will be painted.
Returns:
Whether labels will be painted.

getPaintTicks

public boolean getPaintTicks()
This method returns whether the slider will paint its tick marks. In addition to setting this property to true, one of minor tick spacing or major tick spacing must be set to a value greater than 0 in order for ticks to be painted.
Returns:
Whether ticks will be painted.

getPaintTrack

public boolean getPaintTrack()
This method returns whether the track will be painted.
Returns:
Whether the track will be painted.

getSnapToTicks

public boolean getSnapToTicks()
This method returns whether this slider is snapping to ticks. Sliders that snap to ticks will automatically move the thumb to the nearest tick mark.
Returns:
Whether this slider snaps to ticks.

getUI

public SliderUI getUI()
This method returns the slider's UI delegate.
Returns:
The slider's UI delegate.

getUIClassID

public String getUIClassID()
This method returns a name to identify which look and feel class will be the UI delegate for the slider.
Overrides:
getUIClassID in interface JComponent
Returns:
The Look and Feel classID. "SliderUI"

getValue

public int getValue()
This method returns the current value of the slider.
Returns:
The value of the slider stored in the model.

getValueIsAdjusting

public boolean getValueIsAdjusting()
This method returns this slider's isAdjusting value which is true if the thumb is being dragged.
Returns:
The slider's isAdjusting value.

paramString

protected String paramString()
This method is used primarily for debugging purposes and returns a string that can be used to represent this slider.
Overrides:
paramString in interface JComponent
Returns:
A string representing this slider.

removeChangeListener

public void removeChangeListener(ChangeListener listener)
This method removes a listener from this slider.
Parameters:
listener - The listener to remove.

setExtent

public void setExtent(int extent)
This method sets the extent value for this slider.
Parameters:
extent - The extent value for this slider.

setInverted

public void setInverted(boolean inverted)
This method changes the "inverted" property for this slider.Horizontal sliders that are not inverted will have the minimums on the left. If they are inverted, the minimums will be on the right. Vertical sliders that are not inverted will have the minimums at the bottom. If they are inverted, the minimums will be at the top. However, if the slider's componentOrientation is set to RIGHT_TO_LEFT, then everything gets reversed again.
Parameters:
inverted - Whether the slider should be inverted.

setLabelTable

public void setLabelTable(Dictionary table)
This method changes the "labelTable" property of this slider.
Parameters:
table - The label table for this slider.

setMajorTickSpacing

public void setMajorTickSpacing(int spacing)
This method changes the "majorTickSpacing" property for this slider. The major tick spacing is the amount of units between each major tick mark.
Parameters:
spacing - The amount of units between each major tick mark.

setMaximum

public void setMaximum(int maximum)
This method sets the maximum value of the slider.
Parameters:
maximum - The maximum value of the slider.

setMinimum

public void setMinimum(int minimum)
This method sets the minimum value of the slider.
Parameters:
minimum - The minimum value of the slider.

setMinorTickSpacing

public void setMinorTickSpacing(int spacing)
This method changes the "minorTickSpacing" property for this slider. The minor tick spacing is the amount of units between each minor tick mark.
Parameters:
spacing - The amount of units between each minor tick mark.

setModel

public void setModel(BoundedRangeModel model)
This method changes the "model" property. It also needs to unregister any listeners to the old model and register any listeners to the new model.
Parameters:
model - The model to use with the slider.

setOrientation

public void setOrientation(int orientation)
This method changes the "orientation" property of this slider. If the orientation is not VERTICAL or HORIZONTAL, this method does nothing.
Parameters:
orientation - The orientation of this slider.

setPaintLabels

public void setPaintLabels(boolean paint)
This method changes the "paintLabels" property.
Parameters:
paint - Whether labels will be painted.

setPaintTicks

public void setPaintTicks(boolean paint)
This method changes the "paintTicks" property for this slider. In addition to setting this property to true, one of minor tick spacing or major tick spacing must be set to a value greater than 0 in order for ticks to be painted.
Parameters:
paint - Whether ticks will be painted.

setPaintTrack

public void setPaintTrack(boolean paint)
Sets the flag that controls whether or not the track is painted, and sends a PropertyChangeEvent (for the "paintTrack" property) to all registered listeners.
Parameters:
paint - Whether the track will be painted.

setSnapToTicks

public void setSnapToTicks(boolean snap)
This method sets whether this slider will snap to ticks. Sliders that snap to ticks will automatically move the thumb to the nearest tick mark.
Parameters:
snap - Whether this slider snaps to ticks.

setUI

public void setUI(SliderUI ui)
This method sets the slider's UI delegate.
Parameters:
ui - A SliderUI object to use with this slider.

setValue

public void setValue(int value)
This method sets the value of the slider.
Parameters:
value - The slider's new value.

setValueIsAdjusting

public void setValueIsAdjusting(boolean adjusting)
This method sets the isAdjusting value for the slider.
Parameters:
adjusting - The slider's isAdjusting value.

updateLabelUIs

protected void updateLabelUIs()
This method is called to reset UI delegates for the labels in the labelTable to a default for the current look and feel.

updateUI

public void updateUI()
This method sets this slider's UI to the UIManager's default for the current look and feel.
Overrides:
updateUI in interface JComponent

JSlider.java -- Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Classpath; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.