@Override
			public Dimension getPreferredSize() {
				Dimension size = super.getPreferredSize();
				int height = size.height;
				// use height of invisible buttons to always have same title pane height
				if( !iconButton.isVisible() )
					height = Math.max( height, iconButton.getPreferredSize().height );
				if( !maxButton.isVisible() )
					height = Math.max( height, maxButton.getPreferredSize().height );
				if( !closeButton.isVisible() )
					height = Math.max( height, closeButton.getPreferredSize().height );
				return new Dimension( size.width, height );
			}
Provides the Flat LaF internal frame title bar.

@author Karl Tauber
flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatInternalFrameTitlePane.java