私は JavaFx の初心者です。FXMl で作成された 2 つの gridPane があります。Javafx で同じことをしたいです。
GridPane を拡張するクラスを作成したいので、クラスを呼び出すと、fxml と同じ結果が得られます
<GridPane layoutX="138.0" layoutY="72.0">
<children>
<Label text="01" GridPane.columnIndex="1" GridPane.rowIndex="0" />
<Label text="01" GridPane.columnIndex="2" GridPane.rowIndex="0" />
<Label text="01" GridPane.columnIndex="3" GridPane.rowIndex="0" />
<Label text="01" GridPane.columnIndex="4" GridPane.rowIndex="0" />
<Label text="01" GridPane.columnIndex="0" GridPane.rowIndex="0" />
</children>
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="25.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="25.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="25.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="25.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="25.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
</GridPane>
<GridPane layoutX="38.0" layoutY="102.0">
<children>
<Label prefWidth="74.0" text="Label" GridPane.columnIndex="0" GridPane.rowIndex="0" />
</children>
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="25.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="25.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="25.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="25.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="25.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
</GridPane>