private void adjustWindowSize(ContainerWrapper parent){
  BoundSize wBounds=lc.getPackWidth();
  BoundSize hBounds=lc.getPackHeight();
  if (wBounds == null && hBounds == null)   return;
  Window win=((Window)SwingUtilities.getAncestorOfClass(Window.class,(Component)parent.getComponent()));
  if (win == null)   return;
  Dimension prefSize=win.getPreferredSize();
  int targW=constrain(checkParent(win),win.getWidth(),prefSize.width,wBounds);
  int targH=constrain(checkParent(win),win.getHeight(),prefSize.height,hBounds);
  int x=Math.round(win.getX() - ((targW - win.getWidth()) * (1 - lc.getPackWidthAlign())));
  int y=Math.round(win.getY() - ((targH - win.getHeight()) * (1 - lc.getPackHeightAlign())));
  win.setBounds(x,y,targW,targH);
}

private void adjustWindowSize ( ContainerWrapper parent ) { BoundSize wBounds = lc . getPackWidth ( ) ; BoundSize hBounds = lc . getPackHeight ( ) ; if ( wBounds == null && hBounds == null ) return ; Window win = ( ( Window ) SwingUtilities . getAncestorOfClass ( Window . class , ( Component ) parent . getComponent ( ) ) ) ; if ( win == null ) return ; Dimension prefSize = win . getPreferredSize ( ) ; int targW = constrain ( checkParent ( win ) , win . getWidth ( ) , prefSize . width , wBounds ) ; int targH = constrain ( checkParent ( win ) , win . getHeight ( ) , prefSize . height , hBounds ) ; int x = Math . round ( win . getX ( ) - ( ( targW - win . getWidth ( ) ) * ( 1 - lc . getPackWidthAlign ( ) ) ) ) ; int y = Math . round ( win . getY ( ) - ( ( targH - win . getHeight ( ) ) * ( 1 - lc . getPackHeightAlign ( ) ) ) ) ; win . setBounds ( x , y , targW , targH ) ; }
checks the parent window if its size is within parameters as set by the lc .
