JList

Palette category
Swing
Palette bean
JList
Project
JFC class libraries
Package
com.sun.java.swing
Type
JList

Use a JList bean 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.

Use a List bean, rather than a JList bean, if you want to use it in an AWT container. Although Swing and AWT beans can be mixed, it is inadvisable.


Related procedures
Adding a List or Slider Component

Related references
List and Slider Beans
Beans for Visual Composition