DefaultMutableTreeNode newNode = addExperimentToWorkspace(experiment, node);
  private void createCMTExperiment(DefaultMutableTreeNode node,                                   String experimentName,                                   String experimentId,                                   String trialId,                                   boolean isCloned) {    System.out.println("Creating society");    // get assembly ids for trial    ArrayList assemblyIds = getTrialAssemblyIds(experimentId, trialId);    String assemblyMatch = getAssemblyMatch(assemblyIds);    // get nodes for trial    ArrayList nodes = getNodes(trialId, assemblyMatch);    ArrayList hosts = getHosts(trialId, assemblyMatch);    CMTSociety soc = null;    if (assemblyIds.size() != 0) {      soc = new CMTSociety(assemblyIds);            soc.initProperties();    } else { // We need to create a new trial.      // Need to have the experiment id, trial id, and multiplicity      // for the call that will generate the assembly here.      System.out.println("No assemblies for: " + experimentId + " " + trialId);      return; // creating an experiment from scratch not implemented yet    }    Experiment experiment = new Experiment((String)experimentName,                                            experimentId, trialId);    experiment.setCloned(isCloned);    DefaultMutableTreeNode newNode =      addExperimentToWorkspace(experiment, node);    experiment.addSocietyComponent((SocietyComponent)soc);    // Add all Nodes.    addAgents(experiment, nodes, soc.getAgents(), trialId, assemblyMatch);    // Add all Hosts.    Iterator hostIter = hosts.iterator();    while (hostIter.hasNext()) {      experiment.addHost((String)hostIter.next());    }        workspace.setSelection(newNode);  }