public int attachChild(Spatial child) {
        return attachChildAt(child, children.size());
    }
<code>attachChild</code> attaches a child to this node. This node
becomes the child's parent. The current number of children maintained is
returned.
<br>
If the child already had a parent it is detached from that former parent.

@param child
           the child to attach to this node.
@return the number of children maintained by this node.
@throws IllegalArgumentException if child is null.
jme3-core/src/main/java/com/jme3/scene/Node.java