@Override
	protected void addSubComponents() {
		titleLabel = new JLabel( frame.getTitle() );
		titleLabel.setFont( FlatUIUtils.nonUIResource( getFont() ) );
		titleLabel.setMinimumSize( new Dimension( UIScale.scale( 32 ), 1 ) );
		updateFrameIcon();
		updateColors();

		buttonPanel = new JPanel() {
			@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 );
			}
		};
		buttonPanel.setLayout( new BoxLayout( buttonPanel, BoxLayout.LINE_AXIS ) );
		buttonPanel.setOpaque( false );

		buttonPanel.add( iconButton );
		buttonPanel.add( maxButton );
		buttonPanel.add( closeButton );

		add( titleLabel, BorderLayout.CENTER );
		add( buttonPanel, BorderLayout.LINE_END );
	}
Provides the Flat LaF internal frame title bar.

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