public static void moveAndScale(@NotNull Dimension size, @NotNull Rectangle fromScreen, @NotNull Rectangle toScreen) {
    checkScreensNonEmpty(fromScreen, toScreen);
    double kw = toScreen.getWidth() / fromScreen.getWidth();
    double kh = toScreen.getHeight() / fromScreen.getHeight();
    size.setSize(size.width * kw, size.height * kh);
  }
public static void moveAndScale(@NotNull Dimension size, @NotNull Rectangle fromScreen, @NotNull Rectangle toScreen)