return new Dimension(xTotal.maximum + i.left + i.right, yTotal.maximum + i.top + i.bottom);
int xDim = xTotal.maximum + i.left + i.right; int yDim = yTotal.maximum + i.top + i.bottom;   if (xDim < xTotal.maximum) xDim = Integer.MAX_VALUE; if (yDim < yTotal.maximum) yDim = Integer.MAX_VALUE; return new Dimension(xDim, yDim);
  public Dimension maximumLayoutSize(Container parent)  {    synchronized (container.getTreeLock())      {    if (container != parent)      throw new AWTError("BoxLayout can't be shared");    checkTotalRequirements();        Insets i = container.getInsets();        return new Dimension(xTotal.maximum + i.left + i.right,                             yTotal.maximum + i.top + i.bottom);  }  }