DefaultMutableTreeNode newNode = addExperimentToWorkspace(newExperiment, experimentNode); workspace.setSelection(newNode);  GUIUtils.timeConsumingTaskEnd(c); }
synchronized (root) { while (true) { try { long now = System.currentTimeMillis(); if (updateNeeded && now > nextUpdate) { save(workspaceFileName); updateNeeded = false; root.notifyAll(); } else if (updateNeeded) { long delay = nextUpdate - now; if (delay > 0) { root.wait(delay); } } else { root.wait(); } } catch (InterruptedException ie) { } } } }
        public void run() {          DefaultMutableTreeNode newNode =            addExperimentToWorkspace(newExperiment, experimentNode);          workspace.setSelection(newNode);          // restore default cursor and allow input          GUIUtils.timeConsumingTaskEnd(c);        }