@Override
	public void paint( Graphics g ) {
		super.paint( g );

		if( !UIManager.getBoolean( KEY_DEBUG_SHOW_RECTANGLES ) )
			return;

		if( debugTitleBarHeight > 0 ) {
			// title bar height is measured from window top edge
			int y = SwingUtilities.convertPoint( window, 0, debugTitleBarHeight, this ).y;
			g.setColor( Color.green );
			g.drawLine( 0, y, getWidth(), y );
		}

		g.setColor( Color.red );
		debugPaintComponentWithMouseListener( g, Color.red, rootPane.getLayeredPane(), 0, 0 );

		debugPaintRect( g, Color.blue, debugAppIconBounds );
		debugPaintRect( g, Color.blue, debugMinimizeButtonBounds );
		debugPaintRect( g, Color.magenta, debugMaximizeButtonBounds );
		debugPaintRect( g, Color.cyan, debugCloseButtonBounds );
	}
Returns whether the menubar should be embedded into the title pane.
flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTitlePane.java