}
  public Dimension preferredLayoutSize(Container parent)  {    if (container != parent)      throw new AWTError("BoxLayout can't be shared");    checkTotalRequirements();    Insets i = container.getInsets();    return new Dimension(xTotal.preferred + i.left + i.right,                         yTotal.preferred + i.top + i.bottom);  }