/** * * Each non abstract class that implements the ActionListener must have this method. * * @param e the action event. */ public void actionPerformed(ActionEvent e) { if (e.getSource() == submitButton) { int result = submit(); if (result == 0) { JOptionPane.showMessageDialog( this, "Fehler: Produktgruppe " + produktgruppeFormular.nameField.getText() + " konnte nicht eingefügt werden.", "Fehler", JOptionPane.ERROR_MESSAGE); } else { produktgruppenListe.updateAll(); closeButton.doClick(); } return; } super.actionPerformed(e); }