使用BorderPane
布局,您可以使用单独的FXML文件填充其中的每个部分(顶部,左侧,中央,右侧和底部吗?
所以我会有一个main.fxml像:
<BorderPane fx:controller="main.mainController" xmlns:fx="http://javafx.com/fxml" >
<top>
reads from top.fxml
</top>
<left>
reads from left.fxml
</left>
<center>
reads from center.fxml
</center>
<right>
reads from right.fxml
</right>
<bottom>
reads from bottom.fxml
</bottom>
</BorderPane>
有两种方法可以做到: