Dimension () { Dimension size = super.getPreferredSize(); if (size.height > 0) { size.height = JBUI.scale(JBUI.unscale(JBRunnerTabs.getTabLabelPreferredHeight()) - 1); // without bottom border } return size; }