Programmer's Guide > Interfaces > Component interface > appendChild method
  
appendChild method
Appends the component newChild to the end of the list of children. If the newChild is already in the tree, it is first removed.
appendChild(newChild )
Parameters
ComponentnewChild
The component to append.
Returns
Component. The component being appended.
Throws
WindowException
HIERARCHY_REQUEST_ERR: Raised if the component is of a type that does not allow children of the type of the newChild component, or if the component to append is one of this component's ancestors.
WRONG_WINDOW_ERR: Raised if newChild was created from a different window than the one that created this component.