SwingUtilities.invokeLater(new Runnable() { public void run() { findServlet(); JInternalFrame jif = new JInternalFrame("GLS", true, false, true, true); jif.getContentPane().add(new GLSClient(getOPlanAgentURL())); jif.setSize(350, 350); jif.setLocation(0, 0); jif.setVisible(true); desktop.add(jif, JLayeredPane.DEFAULT_LAYER); try { jif.setIcon(true); } catch (PropertyVetoException e) {
if(findServlet()) { SwingUtilities.invokeLater(new Runnable() { public void run() { JInternalFrame jif = new JInternalFrame("GLS", true, false, true, true); jif.getContentPane().add(new GLSClient(getOPlanAgentURL())); jif.setSize(350, 350); jif.setLocation(0, 0); jif.setVisible(true); desktop.add(jif, JLayeredPane.DEFAULT_LAYER); try { jif.setIcon(true); } catch (PropertyVetoException e) { }
  private void runTrial() {    setTrialValues();    runStart = new Date();    nodeCreationInfoList = new ArrayList();    prepareToCreateNodes();    stopNodeCreation = false;    startTimers();    nodeCreator = new Thread("CreateNodes") {      public void run() {        createNodes();        starting = false;        // reset controls if no nodes started successfully        boolean reset = false;        synchronized (runningNodesLock) {          if (runningNodes.isEmpty())             reset = true;        } // end synchronized        if (reset) {          SwingUtilities.invokeLater(new Runnable() {              public void run() {                runButton.setSelected(false);                runButton.setEnabled(true);                unsetTrialValues();                currentTrial--;              }            });        } else          // create and display iconified GLSClient          // if its servlet exists          SwingUtilities.invokeLater(new Runnable() {              public void run() {                findServlet();                JInternalFrame jif =                   new JInternalFrame("GLS", true, false, true, true);                jif.getContentPane().add(new GLSClient(getOPlanAgentURL()));                jif.setSize(350, 350);                jif.setLocation(0, 0);                jif.setVisible(true);                desktop.add(jif, JLayeredPane.DEFAULT_LAYER);                try {                  jif.setIcon(true);                } catch (PropertyVetoException e) {                }              }            });      }    };    starting = true;    try {      nodeCreator.start();    } catch (RuntimeException re) {      if(log.isErrorEnabled()) {        log.error("Exception", re);      }    }  }