Dimension (JComponent c, Dimension size) { JBInsets.addTo(size, ((JTextComponent)c).getMargin()); size.height = Math.max(size.height, getMinimumHeight(size.height)); size.width = Math.max(size.width, MINIMUM_WIDTH.get()); return size; }