Problem Adding Content To JTabbedPane
I'm trying to add stuff to this tabbed pane, but my compiler is showing a NullPointerException at the indicated line. What is wrong?
If you need more of my code than this, please let me know. This is getting very frustrating. I've been trying to solve this for at least an hour. I need some help!
lengthFrom = new JList(listModel);
JScrollPane lengthFromScroll = new JScrollPane(lengthFrom);
tabLength.add(lengthFromScroll); // NullPointerException
lengthTo = new JList(listModel);
JScrollPane lengthToScroll = new JScrollPane(lengthTo);
tabLength.add(lengthToScroll); // If I take out the problem line, this get a