agentComponent.addChild(asset); addContainerComponent(asset, "Property Groups"); addContainerComponent(asset, "Relationships");
addContainerComponent(assetNode, asset, "Property Groups"); addContainerComponent(assetNode, asset, "Relationships");
  private void addAgent() {    String name =       (String)JOptionPane.showInputDialog(this, "Enter Agent Name",                                           "Agent Name",                                          JOptionPane.QUESTION_MESSAGE,                                          null, null, "");    if (name == null) return;    DefaultMutableTreeNode selNode =      (DefaultMutableTreeNode)tree.getSelectionPath().getLastPathComponent();    ModifiableComponent society =       (ModifiableComponent)nodeToComponent.get(selNode);    AgentComponent agentComponent =       (AgentComponent)new AgentUIComponent(name);    // put the node in the tree before adding properties to it    PropertyTreeNode agentNode = createTreeNode(agentComponent, selNode);    agentComponent.initProperties();    society.addChild(agentComponent);    tree.setSelectionPath(tree.getSelectionPath().pathByAddingChild(agentNode));    addContainerComponent(agentComponent, "Binders");    addContainerComponent(agentComponent, "Plugins");    AssetComponent asset = (AssetComponent)new AssetUIComponent();    PropertyTreeNode assetNode = createTreeNode(asset, agentNode);    asset.initProperties();    agentComponent.addChild(asset);    addContainerComponent(asset, "Property Groups");    addContainerComponent(asset, "Relationships");  }