private AffineTransform rotateGraphics( Graphics g, int tabPlacement, Rectangle r ) {
		Graphics2D g2 = (Graphics2D) g;
		AffineTransform oldTransform = null;

		int rotation = getRealTabRotation( tabPlacement );
		if( rotation == LEFT ) {
			oldTransform = g2.getTransform();
			g2.translate( 0, r.height );
			g2.rotate( Math.toRadians( 270 ), r.x, r.y );
		} else if( rotation == RIGHT ) {
			oldTransform = g2.getTransform();
			g2.translate( r.width, 0 );
			g2.rotate( Math.toRadians( 90 ), r.x, r.y );
		}

		return oldTransform;
	}
The content border insets are used to create a separator between tabs and content.
If client property JTabbedPane.hasFullBorder is true, then the content border insets
are also used for the border.
flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTabbedPaneUI.java