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