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

+10 votes

Some of our screens have more UI than can fit on the default window size. You can drag the screen down to be able to see/access all of it, but we want the windows to just open to the correct size. We tried changing the size in the fxml files, and that didn't seem to work.

asked in CSC 305 Fall 2024 by (4.5k points)

2 Answers

+6 votes
 
Best answer

Have you tried increasing the numbers in the scene creation? It should be something like

scene = new Scene(loadFXML("homePage"), 640, 680);

From here, you should be able to increase the height and the width of the window to whatever size works best for you.

answered by (2k points)
selected by
+6 votes

The width and height of your window are the parameters passed when you create the Stage. Try adjusting those when you create a new stage and it should make that window bigger.

answered by (4.1k points)
...