是否可以将左半部分和右半部分(如下图所示)精确地分成两半?它应该恰好是绿线的一半。
如果可能,我不想使用固定的像素大小,而是使用百分比!
提前THX!
在我的.fxml文件中,我具有以下代码(不包括最左侧的内容)
<AnchorPane minHeight="352.0" minWidth="352.0" prefHeight="566.0" prefWidth="566.0">
<children>
<ScrollPane fitToWidth="true" prefHeight="561.0" prefWidth="566.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="0.0" AnchorPane.rightAnchor="0.0">
<content>
<VBox fx:id="left_side" prefWidth="100.0" prefHeight="200.0" />
</content>
</ScrollPane>
</children>
</AnchorPane>
<AnchorPane minHeight="352.0" minWidth="352.0" prefHeight="566.0" prefWidth="566.0">
<children>
<ScrollPane fitToWidth="true" prefHeight="561.0" prefWidth="566.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="0.0" AnchorPane.rightAnchor="0.0">
<content>
<VBox fx:id="right_side" prefWidth="100.0" prefHeight="200.0" />
</content>
</ScrollPane>
</children>
</AnchorPane>