JPanel (@NotNull JComponent wrapped) { return new NonOpaquePanel(wrapped) { @Override public Dimension getPreferredSize() { Dimension size = super.getPreferredSize(); size.height = JBRunnerTabs.getTabLabelPreferredHeight(); return size; } }; }