organizer.addExperiment();
  public void actionPerformed(ActionEvent e) {    String s = ((AbstractButton)e.getSource()).getActionCommand();    if (s.equals(NEW_MENU_ITEM)) {      newWorkspace();    } else if (s.equals(NEW_RESULTS_MENU_ITEM)) {      setResultDir();    } else if (s.equals(EXIT_MENU_ITEM)) {      exit();    } else if (s.equals(HELP_MENU_ITEM)) {      URL help = (URL)getClass().getResource(HELP_DOC);      if (help != null)	Browser.setPage(help);    } else if (s.equals(VERSION_ITEM)) {      String txt = writeDebug();      if (txt != null)	Browser.setPage(txt);    } else if (s.equals(ABOUT_CSMART_ITEM)) {      URL about = (URL)getClass().getResource(ABOUT_DOC);      if (about != null)	Browser.setPage(about);    } else if (s.indexOf(CONFIGURATION_BUILDER) != -1) {      // Configuration Builder is used to edit both societies and recipes      ArrayList components = new ArrayList();      RecipeComponent[] recipes = organizer.getSelectedRecipes();      if (recipes != null)         for (int i = 0; i < recipes.length; i++)          components.add(recipes[i]);      SocietyComponent[] societies = organizer.getSelectedSocieties();      if (societies != null)        for (int i = 0; i < societies.length; i++)          components.add(societies[i]);      // TODO: get society out of experiment      Experiment[] experiments = organizer.getSelectedExperiments();      if (experiments != null)        for (int i = 0; i < experiments.length; i++)          components.add(experiments[i]);      // if no recipes or societies, then try to create a society//        if (components.size() == 0) {//  	organizer.addSociety();//  	societies = organizer.getSelectedSocieties();//          if (societies != null)//            for (int i = 0; i < societies.length; i++)//              components.add(societies[i]);//        }      if (components.size() == 1)	runBuilder((ModifiableComponent)components.get(0), false);      else if (components.size() > 1) {	runMultipleBuilders((ModifiableComponent[])components.toArray(new ModifiableComponent[components.size()]));      }    } else if (s.indexOf(EXPERIMENT_BUILDER) != -1) {      Experiment[] experiments = organizer.getSelectedExperiments();      if (experiments == null || experiments.length == 0) {	organizer.addExperiment();	experiments = organizer.getSelectedExperiments();      }      if (experiments != null && experiments.length == 1)	runExperimentBuilder(experiments[0], false);      else if (experiments != null && experiments.length > 1)	runMultipleExperimentBuilders(experiments);    } else if (s.indexOf(EXPERIMENT_CONTROLLER) != -1) {      Experiment[] experiments = organizer.getSelectedExperiments();      if (experiments != null) {        for (int i = 0; i < experiments.length; i++)           if (experiments[i].isRunnable()) {            runConsole(experiments[i]);            break;          }      }    } else if (s.indexOf(SOCIETY_MONITOR) != -1) {      // only run one society monitor      // if user selects "Society Monitor" and its running      // bring the frame to the front      JFrame societyMonitorFrame =         NamedFrame.getNamedFrame().getToolFrame(SOCIETY_MONITOR);      if (societyMonitorFrame == null)        runMonitor();      else        societyMonitorFrame.toFront();    } else if (s.indexOf(PERFORMANCE_ANALYZER) != -1) {      Experiment[] experiments = organizer.getSelectedExperiments();      if (experiments != null && experiments.length > 0)        runAnalyzer(experiments[0]);    } else { // a frame selected from the window menu      JFrame f = NamedFrame.getNamedFrame().getFrame(s);      if (f != null) {	f.toFront();	f.setState(Frame.NORMAL);      }    }  }