@Override
			public void paint( Graphics g ) {
				int width = getWidth();
				int height = getHeight();

				if( image != null )
					g.drawImage( image, 0, 0, width, height, null );

				int xy = (pixels / 2) * zoom;
				g.setColor( Color.red );
				((Graphics2D)g).setStroke( new BasicStroke( 2 ) );
				g.drawRect( xy - 1, xy - 1, zoom + 2, zoom + 2 );
			}
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