private static boolean isOverComponent(@Nullable JComponent component) {
      if (component == null) return false;
      Point location = MouseInfo.getPointerInfo().getLocation();
      Point p = new Point(location);
      SwingUtilities.convertPointFromScreen(p, component);
      return component.getVisibleRect().contains(p);
    }
private static boolean isOverComponent(@Nullable JComponent component)