I am making a view in SceneBuilder for my JavaFX application. I want my view to be maximized. How can I achieve this in SceneBuilder or the .fxml
file?
You cannot do that using Scene Builder, since maximize
or fullScreen
are properties of the Stage
and not the layouts set on the scene.
You can load and set the .fxml
on the scene and later set the scene on the stage.
The following methods can be used on the stage :
setMaximized(boolean)
- To maximize the stage and fill the screen.setFullScreen(boolean)
- To set stage as full-screen, undecorated window.