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.


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

Do you mean to ask how it's possible to make the app window size smaller after adjusting it to be fullscreen initially?


For now the program doesn't fit the whole window when I run it. Some buttons that should be on the right are on the center, and the whole layout looks disarranged. What I am trying to do is to make the layout shrink/expand based on if the window is full screen or not.

2 Answers

+6 votes

I think you have to use a border pane from the scene builder, instead of a normal pane. I think this might solve the problem you are facing. Hope this helps.

answered by (8 points)
+5 votes

I know you can do this with relative units in CSS. w3schools has a good page on them here: https://www.w3schools.com/cssref/css_units.asp.

You can attach a CSS stylesheet to your fxml pages by adding

Hope this helps!

answered by (8 points)