@Override
		public void paintBorder( Component c, Graphics g, int x, int y, int width, int height ) {
			// paint bottom border
			Border menuBarBorder = getMenuBarBorder();
			if( menuBarBorder != null ) {
				// if menu bar is embedded, paint menu bar border
				menuBarBorder.paintBorder( rootPane.getJMenuBar(), g, x, y, width, height );
			} else if( borderColor != null && (rootPane.getJMenuBar() == null || !rootPane.getJMenuBar().isVisible()) ) {
				// paint border between title pane and content if border color is specified
				float lineHeight = UIScale.scale( (float) 1 );
				FlatUIUtils.paintFilledRectangle( g, borderColor, x, y + height - lineHeight, width, lineHeight );
			}

			if( isWindowTopBorderNeeded() && !isWindowMaximized() && !isFullWindowContent() )
				WindowTopBorder.getInstance().paintBorder( c, g, x, y, width, height );
		}
Same as {@link Component#contains(int, int)}, but not using that method
because it may be overridden by custom components and invoke code that
tries to request AWT tree lock on 'AWT-Windows' thread.
This could freeze the application if AWT tree is already locked on 'AWT-EventQueue' thread.
flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTitlePane.java