if (experiment != null) {
if (experiment != null && usingExperiment) {
  private void updateControls(boolean isRunning) {    if (experiment != null) {      if (!isRunning) {        experiment.experimentStopped();        csmart.removeRunningExperiment(experiment);      } else        csmart.addRunningExperiment(experiment);      // update society      experiment.getSocietyComponent().setRunning(isRunning);    }    // if not running, enable the run button, and don't select it    // if running, disable the run button and select it    runButton.setEnabled(!isRunning && haveMoreTrials());    runButton.setSelected(isRunning);    // if running, enable the stop button and don't select it    // if not running, disable the stop button and don't select it    stopButton.setEnabled(isRunning);    stopButton.setSelected(false);    abortButton.setEnabled(isRunning);    abortButton.setSelected(false);    // if not running, don't allow the user to restart individual nodes    JInternalFrame[] frames = desktop.getAllFrames();    for (int i = 0; i < frames.length; i++) {      String s = frames[i].getTitle();      if (!s.equals("Configuration") && !s.equals("Trial Values") &&          !s.equals("GLS"))        ((ConsoleInternalFrame)frames[i]).enableRestart(false);    }  }