NodeComponent node = (NodeComponent)iter.next(); ConsoleTreeObject cto = new ConsoleTreeObject(node);
NodeComponent nodeComponent = (NodeComponent)iter.next(); ConsoleTreeObject cto = new ConsoleTreeObject(nodeComponent);
  private void addUnassignedNodesFromExperiment() {    Set unassignedNodes = new TreeSet(baseComponentComparator);    HostComponent[] hosts = experiment.getHosts();    NodeComponent[] nodes = experiment.getNodes();    unassignedNodes.addAll(Arrays.asList(nodes));    for (int i = 0; i < hosts.length; i++)      unassignedNodes.removeAll(Arrays.asList(hosts[i].getNodes()));    DefaultMutableTreeNode root =       (DefaultMutableTreeNode)nodeTree.getModel().getRoot();    DefaultTreeModel model = (DefaultTreeModel)nodeTree.getModel();    Iterator iter = unassignedNodes.iterator();    while (iter.hasNext()) {      NodeComponent node = (NodeComponent)iter.next();      ConsoleTreeObject cto = new ConsoleTreeObject(node);      DefaultMutableTreeNode newNodeTreeNode = 	new DefaultMutableTreeNode(cto, true);      model.insertNodeInto(newNodeTreeNode, root, root.getChildCount());      AgentComponent[] agents = node.getAgents();      for (int j = 0; j < agents.length; j++) {	AgentComponent agentComponent = agents[j];	cto = new ConsoleTreeObject(agentComponent);	DefaultMutableTreeNode newAgentNode = 	  new DefaultMutableTreeNode(cto, false);	model.insertNodeInto(newAgentNode, newNodeTreeNode, 			     newNodeTreeNode.getChildCount());      }    }  }