static Component componentAtMouse() { 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); }