if (trialTableModel.getRowCount() < 2) trialMenu.getComponent(0).setEnabled(false);
  private void doPopup(MouseEvent e) {    Point pt = e.getPoint();    int rowIndex = trialTable.rowAtPoint(pt);    int columnIndex = trialTable.columnAtPoint(pt);    if (rowIndex == -1 || columnIndex == -1)      return; // ignore, clicked outside of table    else {      trialMenu.show(e.getComponent(), e.getX(), e.getY());      deleteRowIndex = rowIndex;    }  }