code: private static BorderLayoutConstraint getConstraints(final WPanel panel, final WComponent child) {
  		Object constraints = panel.getLayoutConstraints(child);
  
  		if (constraints instanceof BorderLayoutConstraint) {
  			return (BorderLayoutConstraint) constraints;
  		} else if (constraints == null) {
  			return BorderLayout.CENTER;
  		} else {
  			throw new IllegalStateException("Constraint must be a BorderLayoutConstraint");
  		}
  	}
docs: Retrieves the layout constraint for the given component. If the constraint is incorrectly configured, an
  {@link IllegalStateException} will be thrown.
  
  @param panel the panel which contains the child
  @param child the component to retrieve the constraint for.
  
  @return the layout constraint for the given component.