public void addLayoutComponent(String place,Component component){
  boolean isValid=true;
  if (place != null) {
    if (place.equals(JSplitPane.DIVIDER)) {
      components[2]=component;
      sizes[2]=getSizeForPrimaryAxis(component.getPreferredSize());
    }
 else     if (place.equals(JSplitPane.LEFT) || place.equals(JSplitPane.TOP)) {
      components[0]=component;
      sizes[0]=0;
    }
 else     if (place.equals(JSplitPane.RIGHT) || place.equals(JSplitPane.BOTTOM)) {
      components[1]=component;
      sizes[1]=0;
    }
 else     if (!place.equals(BasicSplitPaneUI.NON_CONTINUOUS_DIVIDER))     isValid=false;
  }
 else {
    isValid=false;
  }
  if (!isValid)   throw new IllegalArgumentException("cannot add to layout: " + "unknown constraint: " + place);
  doReset=true;
}

public void addLayoutComponent ( String place , Component component ) { boolean isValid = true ; if ( place != null ) { if ( place . equals ( JSplitPane . DIVIDER ) ) { components [ 2 ] = component ; sizes [ 2 ] = getSizeForPrimaryAxis ( component . getPreferredSize ( ) ) ; } else if ( place . equals ( JSplitPane . LEFT ) || place . equals ( JSplitPane . TOP ) ) { components [ 0 ] = component ; sizes [ 0 ] = 0 ; } else if ( place . equals ( JSplitPane . RIGHT ) || place . equals ( JSplitPane . BOTTOM ) ) { components [ 1 ] = component ; sizes [ 1 ] = 0 ; } else if ( ! place . equals ( BasicSplitPaneUI . NON_CONTINUOUS_DIVIDER ) ) isValid = false ; } else { isValid = false ; } if ( ! isValid ) throw new IllegalArgumentException ( "cannot add to layout: " + "unknown constraint: " + place ) ; doReset = true ; }
adds the component at place . place must be one of jsplitpane . left , right , top , bottom , or null ( for the divider ) .
