public void updateSizesAndHeights() {
        double assignedHeight = 0;
        int unassigned = 0;
        double hr = 0.0;
        // for each btc in the tp
        for (Iterator<BaseTableContainer> it = rowList.iterator(); it.hasNext();) {
            BaseTableContainer comp = it.next();
            hr = comp.getHeightRatio();
            //at this point widthScales are accurate for abstract
            if (hr != -1) {
                if (assignedHeight + hr > 1.0) {
                    comp.setHeightRatio(1.0 - assignedHeight);
                    assignedHeight = 1.0;
                } else {
                    assignedHeight += hr;
                }
            } else {  //* entered as weight    
                unassigned++;
            }
        }
/*        if(assignedHeight > 1.0){
        	for (Iterator it = rowList.iterator(); it.hasNext();) {
        		BaseTableContainer comp = (BaseTableContainer) it.next();
        		hr = comp.getHeightRatio();
        		comp.setHeightRatio(hr/assignedHeight);
        	}
        }*/
        int ypos = 0;
        double accumulatedHeightRatio = 0;
        int width = -1;

        for (Iterator<BaseTableContainer> it = rowList.iterator(); it.hasNext();) {
            BaseTableContainer comp = it.next();
            //if abstract
            if (comp.getTable() instanceof TablePane) {
                ((TablePane) comp.getTable()).updateSizesAndHeights();
            }
            if (comp.getHeightRatio() == -1) {
                comp.setHeightRatio((1.0 - assignedHeight) / unassigned);
            }
            Dimension dim = comp.getPreferredSize();
            if (width == -1) {
                width = dim.width;
            }
            //comp.setLocation(xpos, comp.getY());
            accumulatedHeightRatio += comp.getHeightRatio();
            int height;
            if (it.hasNext()) {
                height = (int) Math.round(accumulatedHeightRatio * getHeight()) - ypos;
            } else {
                height = getHeight() - ypos;
            }
            comp.setSize(getWidth(), height);
            ypos += height;
            comp.setLocation(comp.getX(), getHeight() - ypos);
            comp.updateHeader();
        }
        setPreferredSize(new Dimension(width, getHeight()));        
    }