void createButtons(){
  if (scrollForwardButton != null) {
    tabPane.remove(scrollForwardButton);
    scrollForwardButton.removeActionListener(this);
    tabPane.remove(scrollBackwardButton);
    scrollBackwardButton.removeActionListener(this);
  }
  int tabPlacement=tabPane.getTabPlacement();
  int width=UIManager.getInt("ScrollBar.width");
  if (tabPlacement == TOP || tabPlacement == BOTTOM) {
    scrollForwardButton=new ArrowButton(EAST,width);
    scrollBackwardButton=new ArrowButton(WEST,width);
  }
 else {
    scrollForwardButton=new ArrowButton(SOUTH,width);
    scrollBackwardButton=new ArrowButton(NORTH,width);
  }
  scrollForwardButton.addActionListener(this);
  scrollBackwardButton.addActionListener(this);
  tabPane.add(scrollForwardButton);
  tabPane.add(scrollBackwardButton);
}

void createButtons ( ) { if ( scrollForwardButton != null ) { tabPane . remove ( scrollForwardButton ) ; scrollForwardButton . removeActionListener ( this ) ; tabPane . remove ( scrollBackwardButton ) ; scrollBackwardButton . removeActionListener ( this ) ; } int tabPlacement = tabPane . getTabPlacement ( ) ; int width = UIManager . getInt ( "ScrollBar.width" ) ; if ( tabPlacement == TOP || tabPlacement == BOTTOM ) { scrollForwardButton = new ArrowButton ( EAST , width ) ; scrollBackwardButton = new ArrowButton ( WEST , width ) ; } else { scrollForwardButton = new ArrowButton ( SOUTH , width ) ; scrollBackwardButton = new ArrowButton ( NORTH , width ) ; } scrollForwardButton . addActionListener ( this ) ; scrollBackwardButton . addActionListener ( this ) ; tabPane . add ( scrollForwardButton ) ; tabPane . add ( scrollBackwardButton ) ; }
recreates the scroll buttons and adds them to the tabbedpane .
