Can't display JList elements properly.

Sorry if I am posting this in the wrong place, please advise if this is the case.

I am trying out IntelliJ to do some Swing among other things and I have a JList problem in that I can't get the elements to be displayed properly.

Basically the elements are being added but are being added to the side of the form instead of where the JList is.

These 2 lines are showing the elements, if I don't use them I don't see them. But the may explain why it seems like a new JList is being added.



Here is my complete code for the class:




Please sign in to leave a comment.