protected Dimension calculateTabAreaSize() {
			int tabPlacement = tabPane.getTabPlacement();
			boolean horizontal = isHorizontalTabPlacement( tabPlacement );
			FontMetrics metrics = getFontMetrics();
			int fontHeight = metrics.getHeight();

			// calculate size of tabs
			int width = 0;
			int height = 0;
			int tabCount = tabPane.getTabCount();
			for( int i = 0; i < tabCount; i++ ) {
				if( horizontal ) {
					width += calculateTabWidth( tabPlacement, i, metrics );
					height = Math.max( height, calculateTabHeight( tabPlacement, i, fontHeight ) );
				} else {
					width = Math.max( width, calculateTabWidth( tabPlacement, i, metrics ) );
					height += calculateTabHeight( tabPlacement, i, fontHeight );
				}
			}

			// add content separator thickness
			if( horizontal )
				height += scale( contentSeparatorHeight );
			else
				width += scale( contentSeparatorHeight );

			// add insets
			Insets insets = tabPane.getInsets();
			Insets tabAreaInsets = getTabAreaInsets( tabPlacement );
			return new Dimension(
				width + insets.left + insets.right + tabAreaInsets.left + tabAreaInsets.right,
				height + insets.bottom + insets.top + tabAreaInsets.top + tabAreaInsets.bottom );
		}
Calculate preferred size of the tab area.
Used only if {@link #isContentEmpty()} returns {@code true}.
flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTabbedPaneUI.java