private void displayPopupMenu(final MouseEvent event){
  final int selectedIndex=getSelectionIndex(event);
  if (selectedIndex != -1) {
    final JPopupMenu popupMenu=getPopupMenu(event.getX(),event.getY(),selectedIndex);
    if (popupMenu != null) {
      popupMenu.show(this,event.getX(),event.getY());
    }
  }
}

private void displayPopupMenu ( final MouseEvent event ) { final int selectedIndex = getSelectionIndex ( event ) ; if ( selectedIndex != - 1 ) { final JPopupMenu popupMenu = getPopupMenu ( event . getX ( ) , event . getY ( ) , selectedIndex ) ; if ( popupMenu != null ) { popupMenu . show ( this , event . getX ( ) , event . getY ( ) ) ; } } }
creates a popup menu depending on where the user clicked and shows that context menu in the table .
