Find user's screen resolution
Screen.getPrimary().getVisualBounds().getWidth()
Screen.getPrimary().getVisualBounds().getHeight()
Center a window
stage.centerOnScreen()
Shrinkwrap a window to the size of its contents
stage.sizeToScene();
Last modified: February 28, 2023
Back to Debugging Layouts