Adjust stage size after changing the scene

This commit is contained in:
Kai S. K. Engelbart 2020-06-10 10:05:25 +02:00
parent b068796f46
commit 46f8b1e767

View File

@ -108,6 +108,7 @@ public final class SceneContext {
sceneStack.push(scene);
stage.setScene(scene);
applyCSS();
stage.sizeToScene();
stage.show();
} catch (IOException e) {
throw new RuntimeException(e);
@ -124,6 +125,7 @@ public final class SceneContext {
if (!sceneStack.isEmpty()) {
stage.setScene(sceneStack.peek());
applyCSS();
stage.sizeToScene();
}
stage.show();
}