hostComponent.addNode((NodeComponent)cto.getComponent());
NodeComponent nodeComponent = (NodeComponent)cto.getComponent(); if (!hostComponentHasNode(hostComponent, nodeComponent)) hostComponent.addNode(nodeComponent);
  private void treeNodesInsertedInHostTree(TreeModelEvent e) {    TreePath path = e.getTreePath(); // parent of the new node    DefaultMutableTreeNode changedNode =       (DefaultMutableTreeNode)path.getLastPathComponent();    ConsoleTreeObject cto = (ConsoleTreeObject)(changedNode.getUserObject());    //    System.out.println("CSMARTConsole: treeNodesInsertedInHostTree: " + cto.toString());    // agents were dragged on to a node    // tell the node that agents were added     if (cto.isNode()) {      addAgentsToNode((NodeComponent)cto.getComponent(), e.getChildren());    } else if (cto.isHost()) {      // nodes were dragged on to a host      // tell the host that nodes were added      HostComponent hostComponent = (HostComponent)cto.getComponent();      Object[] newChildren = e.getChildren();      for (int i = 0; i < newChildren.length; i++) {	DefaultMutableTreeNode treeNode =	  (DefaultMutableTreeNode)newChildren[i];	cto = (ConsoleTreeObject)treeNode.getUserObject();	hostComponent.addNode((NodeComponent)cto.getComponent());      }    }    setNameServerHostName(); // potentially update name server host    //    setRunButtonEnabled();  }