DefaultMutableTreeNode parent =
DefaultMutableTreeNode parentNode =
  public void startConsole() {    DefaultMutableTreeNode node = getSelectedNode();    Object o = node.getUserObject();    Experiment experiment;    if (o instanceof SocietyComponent) {      SocietyComponent sc = (SocietyComponent) o;      String name = "Temp Experiment for " + sc.getSocietyName();      name = experimentNames.generateName(name);      experiment = new Experiment(name,				  sc,				  new RecipeComponent[0]);      DefaultMutableTreeNode parent = 	(DefaultMutableTreeNode) node.getParent();      DefaultMutableTreeNode newNode =	new DefaultMutableTreeNode(experiment, false);      model.insertNodeInto(newNode, parent, parent.getChildCount());      experimentNames.add(name);      experiment.addModificationListener(myModificationListener);      workspace.setSelection(newNode);      // can't run if experiment has unbound properties      if (experiment.hasUnboundProperties()) {        csmart.runExperimentBuilder(experiment, false);        return;      }      if (!experiment.hasConfiguration())        experiment.createDefaultConfiguration();    } else if (o instanceof Experiment) {      experiment = (Experiment) o;    } else {      return;    }    // Start up the console on the experiment    csmart.runConsole(experiment);  }