public void removeChildAt(int index){
  if ((index < 0) || (children == null) || (index >= children.size())) {
    throw new ArrayIndexOutOfBoundsException();
  }
  Element child=(Element)children.get(index);
  child.setParent(null);
  children.remove(index);
}

public void removeChildAt ( int index ) { if ( ( index < 0 ) || ( children == null ) || ( index >= children . size ( ) ) ) { throw new ArrayIndexOutOfBoundsException ( ) ; } Element child = ( Element ) children . get ( index ) ; child . setParent ( null ) ; children . remove ( index ) ; }
removes the child at the given index
