Scroll Bar Assignment Help

Assignment Help: >> Controls and Events - Scroll Bar

Scroll Bar:

A document window in a text processor commonly has two scroll bars. The vertical scrollbar to scroll up and down. A horizontal scroll bar same scrolls the document left and right. A scroll bar therefore denotes the associative position of the visible contents in relation to the overall document. This is one classical use of scroll bars.  A scroll bar could also be used as a controller to specify a value from a provided interval.

The Scroll bar gives two constants to denote orientation

public static final HORIZONTAL

public static final VERTICAL

Three constructors gives several ways to create scroll bars:

Scrollbar( )

Scrollbar(int orientation)

Scrollbar(int orientation, int value, int visible, int minimum, int maximum)

The visible argument determines the visible width of the slider. Arguments minimum and maximum specify the interval represented through the scroll bar.

The Scroll bars define an assortment of accessor methods.

1205_Scroll Bar1.png

// Illustrating Scroll bar

import java.awt.*;

import java.applet.*;

public class ScrollbarApplet extends Applet

{

public void init( )

{

Scrollbar bar = new Scrollbar( );

Scrollbar(Scrollbar.HORIZONTAL,0,10,-50,100);

add(bar);

}

}

532_Scroll Bar.png

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd