Showing posts with label setBlockIncrement(). Show all posts
Showing posts with label setBlockIncrement(). Show all posts

Thursday, 6 March 2014

AWT CONTROLS:ScrollBars

A scrollbar is represented by a "slider" widget.......

using Scroll bars

          Scrollbar control represents a scroll bar component in order to enable user to select from range of values.The Scrollbar class embodies a scroll bar, a familiar user-interface object. A scroll bar provides a convenient means for allowing a user to select from a range of values.

Common Constructors:


  • Scrollbar ():

                Creates a Scrollbar instance with a range of 0-100, an initial value of 0, and vertical orientation.

  • Scrollbar(int style):

                     Constructs a new scroll bar with the specified orientation.

  • Scrollbar(int style, int initialValue, int thumbSize, int min, int max)

                   Constructs a new scroll bar with the specified orientation, initial value, page size, and minimum and maximum values.


common methods


  •  getUnitIncrement():  Gets the unit increment for this scrollbar.

                 syntax
                     int getUnitIncrement()

  •  getValue() : Gets the current value of this scroll bar

                syntax:
                      int getValue()