Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+16 votes
asked in CSC305 Fall 2022 by (2k points)

2 Answers

+9 votes

One of the constructors for the Scene object accepts two double values, a width and height for the window. If you are using FXML the line should look something like this:
scene = new Scene(loadFXML("primary"), 640, 480);

the 640 and 480 correspond to a default size of 640x480

answered by (1 point)
+2

Thank You!

+9 votes

Another way to make the screen automatically full screen is

stage.setFullScreen(true);

This will set the screen to full screen mode automatically, while false does the opposite.

answered by (2.4k points)
...