code: public void add(JComponent component, String label) {
          components.add(component);
          component2LabelMap.put(component, label);
          if (components.size() == 1) {
              baseComponent.add(component);
          } else if (components.size() > 1) {
              baseComponent.removeAll();
              for (JComponent c : components) {
                  tabbedPane.add(component2LabelMap.get(c), c);
              }
              baseComponent.add(tabbedPane);
          }
  
  
  //        tabbedPane.add(label, component);
  
          if (component instanceof NodeComponent) {
              // Notify the component that it was added to us
              ((NodeComponent) component).addedToNode(this);
          }
      }
docs: Adds a component to this node.  If there are multiple components
  they will be "stacked" in a tabbed pane.
  
  @param component The component to be added
  @param label     The label for the selection tab which brings the component
  to the front if there are multiple components.