Lists
Groups of buttons can be used to select from a small, usually static, set of behaviors, e.g. toggling between three primary colors.
If we have a larger set of options to choose between, especially if those options are likely to change dynamically in the course of the program, a list component is likely to be a more suitable device.
The class of the Swing list component is JList.
In the display, the elements of a list are stacked vertically in a column.
As with text areas, you will nearly always want to enclose a list component in a scroll pane.