CMTDialog dialog = new CMTDialog(csmart, this, experimentName, experimentId); dialog.processResults(); final String trialId = dialog.getTrialId(); if (trialId == null)
cmtDialog = new CMTDialog(csmart, this, experimentName, experimentId); while (!cmtDialog.isULThreadSelected() && !cmtDialog.wasCancelled()) { JOptionPane.showMessageDialog(this, "You must select at least one thread.", "No Thread Selected", JOptionPane.ERROR_MESSAGE);    cmtDialog = new CMTDialog(csmart, this, experimentName, experimentId); } if (cmtDialog.wasCancelled())
  private void selectExperimentFromDatabase(DefaultMutableTreeNode node) {    Map experimentNamesMap = ExperimentDB.getExperimentNames();    Set keys = experimentNamesMap.keySet();    JComboBox cb = new JComboBox(keys.toArray(new String[keys.size()]));    cb.setEditable(false);    JPanel panel = new JPanel();    panel.add(new JLabel("Select Experiment:"));    panel.add(cb);    int result =       JOptionPane.showConfirmDialog(null, panel, "Experiment",                                    JOptionPane.OK_CANCEL_OPTION,                                    JOptionPane.PLAIN_MESSAGE);    if (result != JOptionPane.OK_OPTION)      return;    String experimentName = (String)cb.getSelectedItem();    String originalExperimentName = experimentName;    String experimentId = (String)experimentNamesMap.get(experimentName);    // produce an unique name for CSMART if necessary    if (experimentNames.contains(experimentName)) {      experimentName =         getUniqueExperimentName(experimentNames.generateName(experimentName));      if (experimentName == null)        return;    }    // get threads and groups information    CMTDialog dialog =       new CMTDialog(csmart, this, experimentName, experimentId);    dialog.processResults(); // a potentially long process    final String trialId = dialog.getTrialId();    if (trialId == null)      return;    createCMTExperiment(node, originalExperimentName,                        dialog.getExperimentName(),                        dialog.getExperimentId(), trialId, dialog.isCloned());  }