outerBox.height = 0; for (Iterator i = outerBox.getChildIterator(); i.hasNext();) { Box child = (Box) i.next(); outerBox.height += child.height; outerBox.adjustWidthForChild(child.getWidth());
if (outerBox.getChildCount() > 0) { Box table = (Box)outerBox.getChild(0); outerBox.height = table.height; outerBox.contentWidth = table.contentWidth;
    private static void calculateOuterBoxDimensions(BlockBox outerBox) {        outerBox.height = 0;        for (Iterator i = outerBox.getChildIterator(); i.hasNext();) {            Box child = (Box) i.next();            outerBox.height += child.height;            outerBox.adjustWidthForChild(child.getWidth());        }    }