float (boolean first) { Component component = first ? myFirstComponent : mySecondComponent; Component other = first ? mySecondComponent : myFirstComponent; if (isHonorMinimumSize()) { boolean bothVisible = component != null && component.isVisible() && other != null && other.isVisible(); if (bothVisible) { double size = getDimension(component.getSize()); component = unwrap(component); other = unwrap(other); double min = getDimension(component.getMinimumSize()); double oMax = getDimension(other.getMaximumSize()); double total = getDimension(getSize()) - getDividerWidth(); double oMaxP = (total - oMax) / total; double minP = size < min ? 0 : min / total; return (float)Math.max(oMaxP, minP); } } return 0.0f; }