Javafx 如何在主fxml中为第二个fxml自动调整大小

Javafx 如何在主fxml中为第二个fxml自动调整大小,javafx,javafx-8,javafx-2,Javafx,Javafx 8,Javafx 2,如何在我的第一个fxml中加载第二个fxml除了每个控制器中的主锚泊烷之外,您最喜欢 此代码包含在fxml中 <AnchorPane minHeight="-Infinity" minWidth="-Infinity" prefHeight="520" prefWidth="782.0" style="-fx-background-color: White; -fx-background-radius: 15px; -fx-border-radius: 12px;" AnchorPan

如何在我的第一个fxml中加载第二个fxml除了每个控制器中的主锚泊烷之外,您最喜欢

此代码包含在fxml中

  <AnchorPane minHeight="-Infinity" minWidth="-Infinity" prefHeight="520" prefWidth="782.0" style="-fx-background-color: White; -fx-background-radius: 15px; -fx-border-radius: 12px;" AnchorPane.bottomAnchor="1.0" AnchorPane.leftAnchor="1.0" AnchorPane.rightAnchor="1.0" AnchorPane.topAnchor="1.0" xmlns="http://javafx.com/javafx/9.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="Controller.CreateitemController">

所做的只是将节点调整为其首选大小。节点是否保持此大小取决于您将其添加到的布局(
setting\u page
)。。。亲爱的开发人员,我的问题是如何在第一个fxml中加载第二个fxml,以及如何在调整第一个fxml的大小时调整第二个fxml的大小?
@FXML
    public void groupshow(ActionEvent event) throws IOException {

        Parent root = FXMLLoader.load(getClass().getResource("/FX/creategroupshow.fxml"));
        setting_page.getChildren().setAll(root);

    }