I am having problems with layouts in JavaFX. Consider the following code.
Stage {
title: "ListView test"
scene: Scene {
width: 400
height: 400
content: [
VBox {
content: [
ListView {
height: 200
width: 200
items: ["item1", "item2"]
}
]
}
]
}
}
I was expecting the ListView to appear at 200 x 200, but no matter how I tried to fix it, the width and height of the ListView seemed fixed. But the following code works to display a ListView, as I expected.
Stage {
title: "ListView test"
scene: Scene {
width: 400
height: 400
content: [
ListView {
height: 200
width: 200
items: ["item1", "item2"]
}
]
}
}
, ? ListView ?