O'Reilly logo

Graphic Java™ 1.2, Volume I: AWT, Third Edition by David M. Geary

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

java.awt.Scrollbar

Although the advent of ScrollPane scrollpane takes away much of Scrollbar's scrollbar's thunder, scrollbars are still useful in their own right; for instance, a scrollbar could be used to implement a quick and dirty slider component—a component, in fact, that we'll use to illustrate the properties and events associated with scrollbars. Our slider contains a scrollbar and a label that displays the scrollbar's current value. For visual effect, we'll wrap the scrollbar and label in a 3D rectangle outlined with a black border. Figure 15-1 shows our slider component in action.

Figure 15-1. A Slider Component. A slider consists of a scrollbar and a label that displays the scrollbar's current value. The scrollbar and label are contained ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required