public void actionPerformed(ActionEvent e){
  ActionMap map=tabPane.getActionMap();
  if (map != null) {
    String actionKey;
    if (e.getSource() == scrollForwardButton) {
      actionKey="scrollTabsForwardAction";
    }
 else {
      actionKey="scrollTabsBackwardAction";
    }
    Action action=map.get(actionKey);
    if (action != null && action.isEnabled()) {
      action.actionPerformed(new ActionEvent(tabPane,ActionEvent.ACTION_PERFORMED,null,e.getWhen(),e.getModifiers()));
    }
  }
}

public void actionPerformed ( ActionEvent e ) { ActionMap map = tabPane . getActionMap ( ) ; if ( map != null ) { String actionKey ; if ( e . getSource ( ) == scrollForwardButton ) { actionKey = "scrollTabsForwardAction" ; } else { actionKey = "scrollTabsBackwardAction" ; } Action action = map . get ( actionKey ) ; if ( action != null && action . isEnabled ( ) ) { action . actionPerformed ( new ActionEvent ( tabPane , ActionEvent . ACTION_PERFORMED , null , e . getWhen ( ) , e . getModifiers ( ) ) ) ; } } }
actionlistener for the scroll buttons .
