public void swapChildren(int index1, int index2) {
        Spatial c2 = children.get(index2);
        Spatial c1 = children.remove(index1);
        children.add(index1, c2);
        children.remove(index2);
        children.add(index2, c1);
    }
More efficient than e.g. detaching and attaching, as no updates are needed.

@param index1 The index of the first child to swap
@param index2 The index of the second child to swap
jme3-core/src/main/java/com/jme3/scene/Node.java