private int calculateTabHeightImpl( int tabPlacement, int tabIndex, int fontHeight, boolean rotated ) {
		int tabHeight;

		Icon icon;
		int iconPlacement = clientPropertyInt( tabPane, TABBED_PANE_TAB_ICON_PLACEMENT, tabIconPlacement );
		if( (iconPlacement == TOP || iconPlacement == BOTTOM) &&
			tabPane.getTabComponentAt( tabIndex ) == null &&
			(icon = getIconForTab( tabIndex )) != null )
		{
			// TOP and BOTTOM icon placement
			tabHeight = icon.getIconHeight();

			View view = getTextViewForTab( tabIndex );
			if( view != null )
				tabHeight += (int) view.getPreferredSpan( View.Y_AXIS ) + scale( textIconGapUnscaled );
			else if( tabPane.getTitleAt( tabIndex ) != null )
				tabHeight += fontHeight + scale( textIconGapUnscaled );

			Insets tabInsets = getTabInsets( tabPlacement, tabIndex );
			tabHeight += tabInsets.top + tabInsets.bottom;
		} else {
			tabHeight = super.calculateTabHeight( tabPlacement, tabIndex, fontHeight ) - 2 /* was added by superclass */;

			// tab components are not rotated
			Component tabComponent;
			if( rotated && (tabComponent = tabPane.getTabComponentAt( tabIndex )) != null ) {
				Dimension prefSize = tabComponent.getPreferredSize();
				tabHeight = tabHeight - prefSize.height + prefSize.width;
			}
		}

		return Math.max( tabHeight, scale( clientPropertyInt( tabPane, TABBED_PANE_TAB_HEIGHT, this.tabHeight ) ) );
	}
Repaint rollover tab, but deferred and only once.
This is to avoid unnecessary repaints in case of temporary changes to rollover tab.

E.g. when moving mouse over a single tab, a re-layout may occur and
set rollover tab to -1, in BasicTabbedPaneUI.TabbedPaneLayout.layoutContainer() and
BasicTabbedPaneUI.TabbedPaneScrollLayout.layoutContainer(), and subsequently
change rollover tab back to previous value.
flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTabbedPaneUI.java