I'm using a JTabbedPane with 3 tabs and Netbeans 7.3. When I open up the Pane, it opens to the first tab, as it should. However if I try to switch to the third tab, the second tab's Components are displayed, even though in the ChangeListener for the JTabbedPane, jTabbedPane.getSelectedIndex() == 2,
as it should.
The third tab's components will only display if you switch to the second tab and then open the third tab. After that, behavior is normal.
The closest thing I could find was this error: JTabbedPane.getTabComponentAt(int) returning null
Has anyone encountered something like this before? I worked around it by "visiting" the second tab in the constructor.