code: private static int getIndexOfChild(final Container parent, final WComponent childComponent) {
  		if (parent instanceof AbstractWComponent) {
  			return ((AbstractWComponent) parent).getIndexOfChild(childComponent);
  		} else {
  			// We have to do this the hard way...
  			for (int i = 0; i < parent.getChildCount(); i++) {
  				if (childComponent == parent.getChildAt(i)) {
  					return i;
  				}
  			}
  		}
  
  		return -1;
  	}
docs: Internal utility method to find the index of a child within a container. This method makes use of the additional
  methods offered by the AbstractWComponent implementation (if available), otherwise it falls back the methods
  declared in the {@link WComponent} interface.
  
  @param parent the container to search for the child in
  @param childComponent the component to search for.
  @return the index of the <code>childComponent</code> in <code>parent</code>, or -1 if <code>childComponent</code>
  is not a child of <code>parent</code>.