tabPane.setSelectedIndex(getNextTabIndexInRun(tabPane.getTabCount(), current));
current = getNextTabIndexInRun(tabPane.getTabCount(), current);  if (tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT) scrollTab(current, tabPane.getTabPlacement());  tabPane.setSelectedIndex(current);
  protected void selectNextTabInRun(int current)  {    tabPane.setSelectedIndex(getNextTabIndexInRun(tabPane.getTabCount(),                                                  current));  }