static Component componentAtScreenLocation(final int x, final int y) { ret swing(func -> Component { Point p = new(x, y); Window window = locationToWindow(p); if (window == null) null; SwingUtilities.convertPointFromScreen(p, window); ret SwingUtilities.getDeepestComponentAt(window, p.x, p.y); }); } static Component componentAtScreenLocation(MouseEvent e) { Point p = e.getLocationOnScreen(); ret componentAtScreenLocation(p.x, p.y); }