Scrollbar.Scrollbar

Scrollbar.Scrollbar

Class Overview | Class Members | This Package | All Packages

Syntax 1
public Scrollbar()
Description
Constructs a new vertical scroll bar.



Syntax 2
public Scrollbar( int orientation )
Parameters
orientation
indicates the orientation of the scroll bar.
Description
Constructs a new scroll bar with the specified orientation.

The orientation argument must take one of the two values Scrollbar.HORIZONTAL, or Scrollbar.VERTICAL, indicating a horizontal or vertical scroll bar, respectively.

Exceptions
IllegalArgumentException when an illegal value for the orientation argument is supplied.



Syntax 3
public Scrollbar( int orientation, int value, int visible, int minimum, int maximum )
Parameters
orientation
indicates the orientation of the scroll bar.
value
the initial value of the scroll bar.
visible
the size of the scroll bar's bubble, representing the visible portion; the scroll bar uses this value when paging up or down by a page.
minimum
the minimum value of the scroll bar.
maximum
the maximum value of the scroll bar.
Description
Constructs a new scroll bar with the specified orientation, initial value, page size, and minimum and maximum values.

The orientation argument must take one of the two values Scrollbar.HORIZONTAL, or Scrollbar.VERTICAL, indicating a horizontal or vertical scroll bar, respectively.

If the specified maximum value is less than the minimum value, it is changed to be the same as the minimum value. If the initial value is lower than the minimum value, it is changed to be the minimum value; if it is greater than the maximum value, it is changed to be the maximum value.