Dimension (JComponent c) { Dimension size = super.getPreferredSize(c); if (size.height == 0) return size; JBValue.UIInteger height = new JBValue.UIInteger("TableHeader.height", 25); return new Dimension(size.width, Math.max(height.get(), size.height)); }