TabLabel (@NotNull TabInfo info) { return new SingleHeightLabel(this, info) { { updateFont(); } @Override public void updateUI() { super.updateUI(); updateFont(); } private void updateFont() { JComponent label = getLabelComponent(); // can be null at the first updateUI call during init if (label != null && ExperimentalUI.isNewUI()) { label.setFont(JBUI.CurrentTheme.DebuggerTabs.font()); } } @Override protected int getPreferredHeight() { return getTabLabelPreferredHeight(); } }; }