I've got a simple UI consisting of an HBox with two elements (here, labels, but I've had the same issue with a TreeView.
stage = new PrimaryStage {
title = "Simple UI"
scene = new Scene {
content = new HBox() {
children = Seq(
new Label("Left"),
new Label("Right")
)
resizable = true
hgrow = Priority.Always
vgrow = Priority.Always
padding = Insets(15.0)
maxHeight = Double.MaxValue
maxWidth = Double.MaxValue
style = " -fx-border-width : 1px; -fx-border-color : #000000"
}
}
}
The HBox doesn't seem to resize when the window is resized - I've used CSS to see the border of the HBox. This has allowed me to confirm that the size of the HBox itself remains unchanged as the window size changes.
What am I missing?