
Arrange items in lists in a
logical order so that the
user can find the desired
item quickly.
SOFTWARE
ENGINEERING TIP
860 CHAPTER 12 Graphical User Interfaces
TABLE 12.15 ListSelectionListener Method API
public void valueChanged( ListSelectionEvent e )
An event handler that implements the ListSelectionListener interface writes code in this
method to respond to the ListSelectionEvent fired by any registered components.
12.9 Lists
In GUIs, often users are asked to select one or more items in a list. Some-
times all items in the list are displayed by default, and sometimes clicking a
button displays the items in a scrollable window. Java provides the JList ...