private boolean tryPopup(final MouseEvent e){
  if (e.isPopupTrigger()) {
    int idx=getIndexForPoint(e.getX(),e.getY());
    if (idx != -1) {
      try {
        tabbedPane.setSelectedIndex(idx);
      }
 catch (      ArrayIndexOutOfBoundsException aioobe) {
        resetTabbedPane();
        tabbedPane.setSelectedIndex(idx);
      }
    }
    showMenu(e);
    return true;
  }
  return false;
}

private boolean tryPopup ( final MouseEvent e ) { if ( e . isPopupTrigger ( ) ) { int idx = getIndexForPoint ( e . getX ( ) , e . getY ( ) ) ; if ( idx != - 1 ) { try { tabbedPane . setSelectedIndex ( idx ) ; } catch ( ArrayIndexOutOfBoundsException aioobe ) { resetTabbedPane ( ) ; tabbedPane . setSelectedIndex ( idx ) ; } } showMenu ( e ) ; return true ; } return false ; }
shows the popup if this was a popup trigger .
