height = size.height;
height = innerSize.height;
  public void layoutContainer(Container parent)  {    if (parent != container)      throw new AWTError("invalid parent");        Dimension size = parent.getSize();    Component[] children = parent.getComponents();    if (isHorizontalIn(parent))      {        int x = 0;        for (int index = 0; index < children.length; index++)          {            Component comp = children[index];            Dimension sz = comp.getPreferredSize();            int width = sz.width;            int height = sz.height;            int cy = 0;            if (height > size.height)              {                height = size.height;              }            else              {                cy = (int) ((size.height - height) * comp.getAlignmentY());              }                        comp.setSize(width, height);            comp.setLocation(x, cy);            x = x + width;                      }      }    else      {        int y = 0;                for (int index = 0; index < children.length; index++)          {            Component comp = children[index];            Dimension sz = comp.getPreferredSize();            int width = sz.width;            int height = sz.height;            int cx = 0;            if (width > size.width)              {                width = size.width;              }            else              {                cx = (int) ((size.width - width) * comp.getAlignmentX());              }                        comp.setSize(width, height);            comp.setLocation(cx, y);            y = y + height;                      }      }      }