Ejemplo n.º 1
0
  void printButton_actionPerformed(ActionEvent e) {
    if (objectTable.getSelectedRow() == -1) {
      JOptionPane.showMessageDialog(this.getTopLevelAncestor(), "No row selected!");
      return;
    }

    printCurrent();
  }
Ejemplo n.º 2
0
  void removeButton_actionPerformed(ActionEvent e) {
    if (objectTable.getSelectedRow() == -1) {
      JOptionPane.showMessageDialog(this.getTopLevelAncestor(), "No row selected!");
      return;
    }

    int returnValue =
        JOptionPane.showConfirmDialog(
            this.getTopLevelAncestor(), "Are you sure?", "Deletion", JOptionPane.YES_NO_OPTION);

    if (returnValue == 1) {
      return;
    }

    removeCurrent();
  }