Ejemplo n.º 1
0
 private void cancelButtonActionPerformed(ActionEvent e) {
   cont.remove(this);
   cont.setCurrent(previous);
   cont.add(cont.getCurrent());
   cont.revalidate();
   cont.repaint();
 }
Ejemplo n.º 2
0
 private void saveButtonActionPerformed(ActionEvent e) {
   String animal = animalField.getText();
   String color = colorField.getText();
   String name = nameField.getText();
   try {
     facade.addNewTrial(animal, color, name);
   } catch (Exception ex) {
     showError();
     ex.printStackTrace();
     return;
   }
   cont.remove(this);
   cont.setCurrent(previous);
   cont.add(cont.getCurrent());
   cont.revalidate();
   cont.repaint();
 }