void () { if (myProportion == 0) { int total = getOrientation() ? getHeight() : getWidth(); float proportion = (float)getFirstComponentPreferredSize() / (total - getDividerWidth()); if (proportion > .0f && proportion < 1.0f) { setProportion(proportion); } } super.doLayout(); }