private static @NotNull Rectangle getScreenRectangle(@NotNull GraphicsDevice device) {
    return getScreenRectangle(device.getDefaultConfiguration());
  }
private static @NotNull Rectangle getScreenRectangle(@NotNull GraphicsDevice device)