How to Use Lists (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Swing Components)
The code passes an array to the list's constructor. The array is filled with strings that were passed in from another object. In our example, the strings happen to be boys' names. Other JList constructors let you initialize a list from a Vector or from an...