Class[] paramClasses = { CSMART.class, Experiment.class }; Object[] params = new Object[2]; params[0] = this; params[1] = experiment; createTool(EXPERIMENT_BUILDER, ExperimentBuilder.class, alwaysNew, experiment.getExperimentName(), experiment, paramClasses, params);
JFrame tool = (JFrame)new ExperimentBuilder(this, experiment); addTool(EXPERIMENT_BUILDER, experiment.getExperimentName(), tool);
  private void runExperimentBuilderWorker(Experiment experiment,                                          boolean alwaysNew) {    // remove the children of the experiment in the tree    // to avoid confusion while editing the experiment    organizer.removeChildren(experiment);    Class[] paramClasses = { CSMART.class, Experiment.class };    Object[] params = new Object[2];    params[0] = this;    params[1] = experiment;    createTool(EXPERIMENT_BUILDER, ExperimentBuilder.class, 	       alwaysNew, experiment.getExperimentName(), experiment,	       paramClasses, params);  }