public void calculatePositions(Container target) {

        if (rows.size() == 0) {
            return;
        }

        //If we already calculated based on this target size then just return
        if (lastTargetDim != null && target.getWidth() > 0 && target.getHeight() > 0) {
            if (target.getWidth() == lastTargetDim.width && target.getHeight() == lastTargetDim.height && rowH != null) {
                return;
            }
        }

        Dimension size = getSize(target);
        Point origin = getOrigin(size, target);

        //Calculate Row Heights
        calculateRowHeightsAndLocations(size.height, origin.y);

        //Calculate Col Widths
        calculateColWidthsAndLocations(size.width, origin.x);

        lastTargetDim = target.getSize();
    }