void update( int x, int y, Color colorAtXY ) {
			colorAtMouse = colorAtXY;

			// capture screen at mouse location
			image = robot.createScreenCapture( new Rectangle( x - (pixels / 2), y - (pixels / 2), pixels, pixels ) );

			// update color in info label
			HSLColor hslColor = new HSLColor( colorAtMouse );
			int hue = Math.round( hslColor.getHue() );
			int saturation = Math.round( hslColor.getSaturation() );
			int luminance = Math.round( hslColor.getLuminance() );
			infoLabel.setText( String.format( "#%06x   HSL %d %d %d",
				colorAtMouse.getRGB() & 0xffffff, hue, saturation, luminance ) );

			// place bottom-right to mouse location
			int mx = x + UIScale.scale( 32 );
			int my = y + UIScale.scale( 32 );

			// make sure that it is within screen
			if( mx + getWidth() > owner.getX() + owner.getWidth() )
				mx = x - getWidth() - UIScale.scale( 32 );
			if( my + getHeight() > owner.getY() + owner.getHeight() )
				my = y - getHeight() - UIScale.scale( 32 );

			setLocation( mx, my );
			setVisible( true );
			repaint();
		}
An invisible window used to receive mouse and keyboard events for the whole screen.
flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatColorPipette.java