if (tabPane.getTabLayoutPolicy() == JTabbedPane.WRAP_TAB_LAYOUT)
    public void stateChanged(ChangeEvent e)    {      selectedRun = getRunForTab(tabPane.getTabCount(),                                 tabPane.getSelectedIndex());      tabPane.revalidate();      tabPane.repaint();    }