private static @Nullable Rectangle getBoundsOnScreen(@Nullable Component component) {
    Point point = getLocationOnScreen(component);
    return point == null ? null : new Rectangle(point, component.getSize());
  }
private static @Nullable Rectangle getBoundsOnScreen(@Nullable Component component)