javafx window resize to screen code example Example: javafx window resize to screen primaryStage.setMaximized(true);