BaseComponent parentBC = (BaseComponent)nodeToComponent.get(selNode); parentBC.addChild(bc);
  private void addBaseComponent(BaseComponent bc) {    DefaultMutableTreeNode selNode =      (DefaultMutableTreeNode)tree.getSelectionPath().getLastPathComponent();    DefaultMutableTreeNode newNode = createTreeNode(bc, selNode);    bc.initProperties();    BaseComponent parentBC = (BaseComponent)nodeToComponent.get(selNode);    parentBC.addChild(bc);    tree.setSelectionPath(tree.getSelectionPath().pathByAddingChild(newNode));  }