#JavaFX Stage Width/Height
1 messages · Page 1 of 1 (latest)
Stage#setResizable(boolean)
A Scene will follow the stage
wdym
I don't understand the problem
right
so ?
if it doesn't follow, then change the size of the stage yourself
setWidth or setPrefWidth
and don't forget that insets are a thing
but why do you not have all scenes with the same size ?
it would be a lot easier
so you read sizes from text files ?
but why ?
alright
but don't forget about insets
they might cause you problems
the borders of the stage
if you set the width of a stage to 500, and each border of the window is 10 pixels, then the scene within will only be able to be 490 pixels
and it's even worse with the height, because the top border is way thicker than the bottom one
so anyway, if you found out that things aren't centered, it might be because of this
and this is also why I wouldn't advise you to manually resize the stage
you can get the insets from a Region btw
if everything is fine then I guess it's fine, but don't forget that