for (Iterator i = children.iterator(); i.hasNext();) { Component comp = (Component) i.next(); Dimension sz = comp.getMinimumSize(); y += sz.height; x = Math.max(x, sz.width); }
hReq = SizeRequirements.getAlignedSizeRequirements(hSizeReqs); vReq = SizeRequirements.getTiledSizeRequirements(vSizeReqs);
  public Dimension minimumLayoutSize(Container parent)  {    if (parent != container)      throw new AWTError("invalid parent");        Insets insets = parent.getInsets();    int x = insets.left + insets.right;    int y = insets.bottom + insets.top;    List children = AWTUtilities.getVisibleChildren(parent);    if (isHorizontalIn(parent))      {        // sum up preferred widths of components, find maximum of preferred        // heights        for (Iterator i = children.iterator(); i.hasNext();)          {	    Component comp = (Component) i.next();            Dimension sz = comp.getMinimumSize();            x += sz.width;            y = Math.max(y, sz.height);          }      }    else      {        // sum up preferred heights of components, find maximum of        //  preferred widths        for (Iterator i = children.iterator(); i.hasNext();)          {	    Component comp = (Component) i.next();            Dimension sz = comp.getMinimumSize();            y += sz.height;            x = Math.max(x, sz.width);          }      }        return new Dimension(x, y);  }