code: public void add(JDesktopPaneLayout child, Object constraints, int index)
      {
          if (child.parent != this)
          {
              throw new IllegalArgumentException(
                  "Layout is not a child of this layout");
          }
          container.add(child.container, constraints, index);
      }
docs: Add the given desktop pane layout as a child to this one
  
  @param child The child to add
  @param constraints The constraints.
  See {@link Container#add(Component, Object)}
  @param index The index.
  See {@link Container#add(Component, Object, int)}
  @throws IllegalArgumentException If the given child was not
  created by calling {@link #createChild()} on this layout