private void popupMenu(MouseEvent e){
  if (contextMenu != null && e.isPopupTrigger()) {
    int modelIndex=indexToModel(table.getSelectedRow());
    if (modelIndex != -1) {
      T entry=data.get(modelIndex);
      contextMenu.showMenu(entry,table,e.getX(),e.getY());
    }
  }
}

private void popupMenu ( MouseEvent e ) { if ( contextMenu != null && e . isPopupTrigger ( ) ) { int modelIndex = indexToModel ( table . getSelectedRow ( ) ) ; if ( modelIndex != - 1 ) { T entry = data . get ( modelIndex ) ; contextMenu . showMenu ( entry , table , e . getX ( ) , e . getY ( ) ) ; } } }
opens the context menu if this mouseevent was a popup trigger and a menu is set .
