A scrollbar is represented by a "slider" widget. The characteristics of it are specified by integer values which are being set at the time of scrollbar construction. Both the types of Sliders are available i.e. horizontal and vertical.
Scrollbar
A scrollbar is represented by a "slider" widget. The characteristics of it are specified by integer values which are being set at the time of scrollbar construction. Both the types of Sliders are available i.e. horizontal and
vertical.
The example below shows the code for the scrollbar construction. The subtraction of scrollbar width from the maximum setting gives the maximum value of the Scrollbar. In the program code, '0' is the <<<<<<< scrollbar.shtml initial value of the scrollbar, '8' is the width of the scrollbar.
======= initial value of the scrollbar, '8' is the width of the scrollbar.
>>>>>>> 1.2
|
Here is the output:
C:\newprgrm>javac ScrollbarDemo.java C:\newprgrm>appletviewer ScrollbarDemo.html |