February 2014
Beginner
1248 pages
62h 25m
English
A multiple-selection list enables the user to select many items from a JList (see the output of Fig. 12.26). A SINGLE_INTERVAL_SELECTION list allows selecting a contiguous range of items. To do so, click the first item, then press and hold the Shift key while clicking the last item in the range. A MULTIPLE_INTERVAL_SELECTION list (the default) allows continuous range selection as described for a SINGLE_INTERVAL_SELECTION list. Such a list also allows miscellaneous items to be selected by pressing and holding the Ctrl key while clicking each item to select. To deselect an item, press and hold the Ctrl key while clicking the item a second time.
The application of Figs. 12.25–12.26 uses multiple-selection lists to ...
Read now
Unlock full access