if (!modified) { JOptionPane.showMessageDialog(this, "No modifications were made."); return; } modified = false;
  public void save() {//      Hashtable newHostToNodes = new Hashtable();//      Hashtable newNodeToAgents = new Hashtable();//      setHostNodeAgentMapping(newHostToNodes, newNodeToAgents);//      Utils.updateHostNodeAgentMapping(hostToNodes, nodeToAgents,//                                       newHostToNodes, newNodeToAgents);    String name = "";    Hashtable experimentNamesHT = ExperimentDB.getExperimentNames();    Set experimentNameSet = experimentNamesHT.keySet();    String[] experimentNames = null;    if (experimentNameSet != null)      experimentNames =         (String[])experimentNameSet.toArray(new String[experimentNameSet.size()]);    while (true) {      name = (String) JOptionPane.showInputDialog(this,                                                   "Enter Experiment Name",                                                  "Experiment Name",                                                  JOptionPane.QUESTION_MESSAGE,                                                  null, null, name);      if (name == null) return;      if (experimentNameSet != null && !experimentNameSet.contains(name))         break;      int answer = JOptionPane.showConfirmDialog(this,                                                 "Use an unique name",                                                 "Experiment Name Not Unique",                                                 JOptionPane.OK_CANCEL_OPTION,                                                 JOptionPane.ERROR_MESSAGE);      if (answer != JOptionPane.OK_OPTION) return;    }    //    experiment.saveToDatabase(name);  }