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

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

Introduction

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

The text is from its open source code.

Constructor

JScrollBar(int orientation)
Creates a scrollbar with the specified orientation and the following initial values:
 minimum = 0 maximum = 100 value = 0 extent = 10 
JScrollBar(int orientation, int value, int extent, int min, int max)
Creates a scrollbar with the specified orientation, value, extent, minimum, and maximum.
JScrollBar()
Creates a vertical scrollbar with the following initial values:
 minimum = 0 maximum = 100 value = 0 extent = 10 

Method

voidaddAdjustmentListener(AdjustmentListener l)
Adds an AdjustmentListener.
voidaddMouseListener(MouseListener l)
Adds the specified mouse listener to receive mouse events from this component.
voidaddMouseWheelListener(MouseWheelListener l)
Adds the specified mouse wheel listener to receive mouse wheel events from this component.
intgetBlockIncrement(int direction)
Returns the amount to change the scrollbar's value by, given a block (usually "page") up/down request.
intgetMaximum()
The maximum value of the scrollbar is maximum - extent.
intgetMinimum()
Returns the minimum value supported by the scrollbar (usually zero).
BoundedRangeModelgetModel()
Returns data model that handles the scrollbar's four fundamental properties: minimum, maximum, value, extent.
MouseListener[]getMouseListeners()
Returns an array of all the mouse listeners registered on this component.
DimensiongetPreferredSize()
If the preferredSize has been set to a non-null value just returns it.
DimensiongetSize()
Returns the size of this component in the form of a Dimension object.
intgetUnitIncrement(int direction)
Returns the amount to change the scrollbar's value by, given a unit up/down request.
intgetValue()
Returns the scrollbar's value.
booleangetValueIsAdjusting()
True if the scrollbar knob is being dragged.
intgetVisibleAmount()
Returns the scrollbar's extent, aka its "visibleAmount".
booleanisEnabled()
Determines whether this component is enabled.
booleanisVisible()
Determines whether this component should be visible when its parent is visible.
voidremoveAdjustmentListener(AdjustmentListener l)
Removes an AdjustmentEvent listener.
voidrepaint()
Repaints this component.
voidsetBlockIncrement(int blockIncrement)
Sets the blockIncrement property.
voidsetEnabled(boolean x)
Enables the component so that the knob position can be changed.
voidsetMaximum(int maximum)
Sets the model's maximum property.
voidsetMinimum(int minimum)
Sets the model's minimum property.
voidsetModel(BoundedRangeModel newModel)
Sets the model that handles the scrollbar's four fundamental properties: minimum, maximum, value, extent.
voidsetPreferredSize(Dimension preferredSize)
Sets the preferred size of this component.
voidsetUnitIncrement(int unitIncrement)
Sets the unitIncrement property.
voidsetValue(int value)
Sets the scrollbar's value.
voidsetVisibleAmount(int extent)
Set the model's extent property.