if (modified) saveHelper(); else JOptionPane.showMessageDialog(this, "No modifications were made.");
if (!modified) { String[] msg = { "No modifications were made.", "Do you want to save this experiment anyway?" }; int answer = JOptionPane.showConfirmDialog(this, msg, "No Modifications", JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE); if (answer != JOptionPane.OK_OPTION) return; setModified(true); } saveHelper();
  private void save() {    if (!experiment.isInDatabase())      return;    if (modified)      saveHelper();    else      JOptionPane.showMessageDialog(this, "No modifications were made.");  }