Lab Work 2

Due Date: 04-07-2001

Late Date: 04-14-2001

 

For this assignment, you are required to make your own scrollbar and make use of it.

You are not supposed to use the in-built Scrollbar provided by java.

Make your own Scrollbar using various components like Buttons, Rectangle, etc. Then you are required to use this scrollbar in an applet.

What will the applet look like?

It will have 2 buttons, V and H being their labels. When we click on V button and then click on the panel anywhere, it will draw a vertical scrollbar there. Same is the case with H button.

(you can keep only one button and make only horizontal scrollbars also)

After drawing 3 scrollbars, you will press yet another button which will draw a ball. And now when we make unit increment or block increments in the scrollbars, it is reflected by change in color of the ball. Also show the changes in the thumb of the scrollbars.

The three scrollbars will provide R(red), G(green), and B(blue) components for the color of the ball.

You can either make an applet or an application.

No penalty till late date.