SocietyComponent society = experiment.getSocietyComponent();
  private void stopButton_actionPerformed(ActionEvent e) {    stopButton.setSelected(true); // indicate stopping    stopButton.setEnabled(false); // disable until experiment stops    SocietyComponent society = experiment.getSocietyComponent();    userStoppedTrials = true; // if self terminating, don't start next trial    if (society != null && !society.isSelfTerminating())      stopAllNodes(); // manually stop society immediately  }