@SuppressWarnings( "deprecation" )
		@Override
		public void layoutContainer( Container parent ) {
			setRolloverTab( -1 );
			calculateLayoutInfo();

			// update visible component
			boolean shouldChangeFocus = false;
			int selectedIndex = tabPane.getSelectedIndex();
			if( selectedIndex >= 0 ) {
				// change visible component only if tab content is not null
				// (see comments in JTabbedPane.fireStateChanged()
				// and in BasicTabbedPaneUI.TabbedPaneLayout.layoutContainer())
				Component oldComp = getVisibleComponent();
				Component newComp = tabPane.getComponentAt( selectedIndex );
				if( newComp != null && newComp != oldComp ) {
					shouldChangeFocus = (SwingUtilities.findFocusOwner( oldComp ) != null);
					setVisibleComponent( newComp );
				}
			} else
				setVisibleComponent( null );

			// layout
			layoutContainerImpl();

			// for compatibility with super class; usually not done here
			// because already done in JTabbedPane.fireStateChanged()
			if( shouldChangeFocus ) {
				// use action because BasicTabbedPaneUI.requestFocusForVisibleComponent()
				// and SwingUtilities2.tabbedPaneChangeFocusTo() are internal methods
				Action action = tabPane.getActionMap().get( "requestFocusForVisibleComponent" );
				if( action != null )
					action.actionPerformed( new ActionEvent( tabPane, ActionEvent.ACTION_PERFORMED, null ) );
			}
		}
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