private void layoutUnderMinimumSpace(Container parent,Dimension realDim,Dimension startPosition){
  for (  Component c : parent.getComponents()) {
    if (c.isVisible()) {
      Dimension compSize=c.getMinimumSize();
      shrink(compSize,realDim);
      int xAlign=0;
      int yAlign=0;
      EnumSet<SLayout> flags=constraints.get(c);
      if (flags.contains(SLayout.EXPAND_PERPENDICULAR)) {
        d.setSecondary(compSize,d.getSecondary(realDim));
      }
 else {
        xAlign=getXAlignment(c,realDim);
        yAlign=getYAlignment(c,realDim);
      }
      int shrink=d.getPrimary(realDim) - d.getPrimary(compSize) - d.getPrimary(startPosition);
      if (shrink < 0) {
        shrink=Math.max(-d.getPrimary(compSize),shrink);
        addToPrimary(compSize,shrink);
      }
      c.setBounds(startPosition.width + xAlign,startPosition.height + yAlign,compSize.width,compSize.height);
      shiftByPrimary(startPosition,compSize);
      addToPrimary(startPosition,padding);
    }
  }
}

private void layoutUnderMinimumSpace ( Container parent , Dimension realDim , Dimension startPosition ) { for ( Component c : parent . getComponents ( ) ) { if ( c . isVisible ( ) ) { Dimension compSize = c . getMinimumSize ( ) ; shrink ( compSize , realDim ) ; int xAlign = 0 ; int yAlign = 0 ; EnumSet < SLayout > flags = constraints . get ( c ) ; if ( flags . contains ( SLayout . EXPAND_PERPENDICULAR ) ) { d . setSecondary ( compSize , d . getSecondary ( realDim ) ) ; } else { xAlign = getXAlignment ( c , realDim ) ; yAlign = getYAlignment ( c , realDim ) ; } int shrink = d . getPrimary ( realDim ) - d . getPrimary ( compSize ) - d . getPrimary ( startPosition ) ; if ( shrink < 0 ) { shrink = Math . max ( - d . getPrimary ( compSize ) , shrink ) ; addToPrimary ( compSize , shrink ) ; } c . setBounds ( startPosition . width + xAlign , startPosition . height + yAlign , compSize . width , compSize . height ) ; shiftByPrimary ( startPosition , compSize ) ; addToPrimary ( startPosition , padding ) ; } } }
lay out the components in a smaller space than the specified minimum . just gives the components their required minimum , until the space runs out .
