@Override
		public Insets getBorderInsets( Component c, Insets insets ) {
			super.getBorderInsets( c, insets );

			Border menuBarBorder = getMenuBarBorder();
			if( menuBarBorder != null ) {
				// if menu bar is embedded, add bottom insets of menu bar border
				Insets menuBarInsets = menuBarBorder.getBorderInsets( c );
				insets.bottom += menuBarInsets.bottom;
			} else if( borderColor != null && (rootPane.getJMenuBar() == null || !rootPane.getJMenuBar().isVisible()) )
				insets.bottom += UIScale.scale( 1 );

			if( isWindowTopBorderNeeded() && !isWindowMaximized() )
				insets = FlatUIUtils.addInsets( insets, WindowTopBorder.getInstance().getBorderInsets() );

			return insets;
		}
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