private static @NotNull Rectangle getScreenRectangle(@Nullable GraphicsConfiguration configuration) {
    return configuration != null
           ? ScreenUtil.getScreenRectangle(configuration)
           : ScreenUtil.getMainScreenBounds();
  }
private static @NotNull Rectangle getScreenRectangle(@Nullable GraphicsConfiguration configuration)