JList (Swing)

Use a JList bean JList to provide a list of choices from which the user can make one or more selections. Your program can add or remove choices from the list. If you want the list to be scrollable, you should place it in a JScrollPane.

By default, the user can select one choice from the list. When the user selects a choice, any previously selected choice is no longer selected. You can change the behavior of the list to allow multiple selection.


Related procedures
Adding a list or slider component

Related references
Sun's JList bean documentation
List and slider beans
Beans for visual composition