February 2014
Beginner
1248 pages
62h 25m
English
JSlider
s enable a user to select from a range of integer values. Class JSlider inherits from JComponent. Figure 22.1 shows a horizontal JSlider with tick marks and the thumb that allows a user to select a value. JSliders can be customized to display major tick marks, minor tick marks and labels for the tick marks. They also support snap-to ticks, which cause the thumb, when positioned between two tick marks, to snap to the closest one.
Fig. 22.1 | JSlider component with horizontal orientation.
Most Swing GUI components support mouse and keyboard interactions—e.g., if a JSlider has the focus (i.e., it’s the currently selected GUI ...
Read now
Unlock full access