private static Container findOpaqueParent( Container c ) {
		while( (c = c.getParent()) != null ) {
			if( c.isOpaque() )
				return c;
		}
		return null;
	}
Find the first parent that is opaque.
flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java