}
  private void exit() {    propertyEditor.stopEditing(); // accept any edit in progress    propertyEditor.exit();    if (isModified()) {      if (experiment != null) {        if (configComponent instanceof SocietyComponent) {          SocietyComponent society = (SocietyComponent)configComponent;          experiment.removeSocietyComponent();          experiment.addSocietyComponent(society);          CSMART.getOrganizer().replaceComponent(experiment, originalComponent, society);        } else if (configComponent instanceof RecipeComponent) {          RecipeComponent recipe = (RecipeComponent)configComponent;          experiment.removeRecipeComponent((RecipeComponent)originalComponent);          experiment.addRecipeComponent(recipe);          CSMART.getOrganizer().replaceComponent(experiment, originalComponent, recipe);        }      }      saveToDatabase();    }  }