private void treeNodesInsertedInNodeTree(TreeModelEvent e) { TreePath path = e.getTreePath(); DefaultMutableTreeNode changedNode = (DefaultMutableTreeNode)path.getLastPathComponent(); ConsoleTreeObject cto = (ConsoleTreeObject)(changedNode.getUserObject());   if (!cto.isRoot()) addAgentsToNode((NodeComponent)cto.getComponent(), e.getChildren());
private void treeNodesInsertedInNodeTree(TreePath path, Object[] children) { BaseComponent component = getComponentFromPath(path); if (component == null) { for (int i = 0; i < children.length; i++) { NodeComponent nodeComponent = (NodeComponent)getComponentFromTreeNode((DefaultMutableTreeNode)children[i]); HostComponent previousParent = (HostComponent)nodeToHost.get(nodeComponent); if (previousParent != null) previousParent.removeNode(nodeComponent); nodeToHost.remove(nodeComponent); } } else addAgentsToNode((NodeComponent)component, children);
  private void treeNodesInsertedInNodeTree(TreeModelEvent e) {    TreePath path = e.getTreePath();    DefaultMutableTreeNode changedNode =       (DefaultMutableTreeNode)path.getLastPathComponent();    ConsoleTreeObject cto = (ConsoleTreeObject)(changedNode.getUserObject());    // agents were dragged on to a node    // tell the node that agents were added     if (!cto.isRoot())       addAgentsToNode((NodeComponent)cto.getComponent(), e.getChildren());  }