protected String layoutAndClipLabel( int tabPlacement, FontMetrics metrics, int tabIndex,
		String title, Icon icon, Rectangle tabRect, Rectangle iconRect, Rectangle textRect, boolean isSelected )
	{
		int rotation = getRealTabRotation( tabPlacement );
		boolean leftToRight = isLeftToRight();

		// remove tab insets and space for close button from the tab rectangle
		// to get correctly clipped title
		tabRect = FlatUIUtils.subtractInsets( tabRect, getTabInsetsRotated( tabPlacement, tabIndex, rotation ) );
		if( isTabClosable( tabIndex ) ) {
			if( rotation == NONE ) {
				int iconWidth = closeIcon.getIconWidth();
				tabRect.width -= iconWidth;
				if( !leftToRight )
					tabRect.x += iconWidth;
			} else {
				int iconHeight = closeIcon.getIconHeight();
				tabRect.height -= iconHeight;
				if( (rotation == LEFT && leftToRight) || (rotation == RIGHT && !leftToRight) )
					tabRect.y += iconHeight;
			}
		}

		// icon placement
		int verticalTextPosition;
		int horizontalTextPosition;
		switch( clientPropertyInt( tabPane, TABBED_PANE_TAB_ICON_PLACEMENT, tabIconPlacement ) ) {
			default:
			case LEADING:  verticalTextPosition = CENTER; horizontalTextPosition = TRAILING; break;
			case TRAILING: verticalTextPosition = CENTER; horizontalTextPosition = LEADING; break;
			case TOP:      verticalTextPosition = BOTTOM; horizontalTextPosition = CENTER; break;
			case BOTTOM:   verticalTextPosition = TOP;    horizontalTextPosition = CENTER; break;
		}

		// reset rectangles
		textRect.setBounds( 0, 0, 0, 0 );
		iconRect.setBounds( 0, 0, 0, 0 );

		// temporary set "html" client property on tabbed pane, which is used by SwingUtilities.layoutCompoundLabel()
		View view = getTextViewForTab( tabIndex );
		if( view != null )
			tabPane.putClientProperty( "html", view );

		// layout label
		String clippedTitle = (rotation == NONE)
			? SwingUtilities.layoutCompoundLabel( tabPane, metrics, title, icon,
				CENTER, getTabAlignment( tabIndex ), verticalTextPosition, horizontalTextPosition,
				tabRect, iconRect, textRect, scale( textIconGapUnscaled ) )
			: layoutVerticalCompoundLabel( rotation, tabPane, metrics, title, icon,
				CENTER, getTabAlignment( tabIndex ), verticalTextPosition, horizontalTextPosition,
				tabRect, iconRect, textRect, scale( textIconGapUnscaled ) );

		// remove temporary client property
		tabPane.putClientProperty( "html", null );

		return clippedTitle;
	}
Actually does nearly the same as super.paintContentBorder() but
  - not using UIManager.getColor("TabbedPane.contentAreaColor") to be GUI builder friendly
  - tabsOverlapBorder is always true
  - paint full border (if enabled)
  - not invoking paintContentBorder*Edge() methods
  - repaint selection
  - painting active tab border style
flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTabbedPaneUI.java