I have a string array that I want to display to a JPanel. How do I implement this?
1 Answer
I would display your list using a JList.
Read the section from the Swing tutorial on How to Use List for working examples that show how to add data to the ListModel of the JList.
Basically instead of adding the strings to a List you add them to a DefaultListModel and add the model to the JList.
1 Comment
camickr
@Sharku, thanks, For some reason I was linking to an image, instead of the tutorial.