protected void checkBounds(Component comp,int x,int y,int width,int height){
  if (comp != null) {
    if (width <= 0) {
      width=comp.getWidth();
    }
    if (maxWidth > 0 && width > maxWidth) {
      width=maxWidth;
    }
    if (height <= 0) {
      height=comp.getHeight();
    }
    if (maxHeight > 0 && height > maxHeight) {
      height=maxHeight;
    }
    comp.setBounds(x,y,width,height);
  }
}

protected void checkBounds ( Component comp , int x , int y , int width , int height ) { if ( comp != null ) { if ( width <= 0 ) { width = comp . getWidth ( ) ; } if ( maxWidth > 0 && width > maxWidth ) { width = maxWidth ; } if ( height <= 0 ) { height = comp . getHeight ( ) ; } if ( maxHeight > 0 && height > maxHeight ) { height = maxHeight ; } comp . setBounds ( x , y , width , height ) ; } }
checks the component ' s dimensions against the requested values and against any maximum limits that may have been set in the windowsupport . calls setbounds ( ) on the component .
