static Component componentAtMouse() { ret (Component) swing(func { Point p = MouseInfo.getPointerInfo().getLocation(); Window window = locationToWindow(p); if (window == null) null; SwingUtilities.convertPointFromScreen(p, window); ret SwingUtilities.getDeepestComponentAt(window, p.x, p.y); }); }