如何使用JFXtras6中的XGrid编写以下代码?
Stage {
title: "Mig Centering Test"
scene: Scene {
width: 200
height: 200
fill: Color.PINK
content: MigLayout {
fitParent: true
layout: "fill"
migContent: MigNode {
constraints: "center"
node: Rectangle {
width: 100
height: 100
}
}
}
}
}我最初的猜测是,它将涉及大量的XLayoutInfo和XGridLayoutInfo。
发布于 2010-02-09 23:27:14
事实证明答案很简单:
Stage {
title: "XGrid Centering Test"
scene: XScene {
width: 200
height: 200
fill: Color.PINK
content: XGrid {
rows: [
row([Rectangle {
height: 100
width: 100
}])
]
}
}
}https://stackoverflow.com/questions/2230068
复制相似问题