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