void (@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); }