Dimension () { Dimension size = super.getPreferredSize(); if (size.height > 0) { size.height = JBRunnerTabs.getTabLabelPreferredHeight() - ((JBRunnerTabs)myTabs).getBorderThickness(); } return size; }