ich habe mir gerade mal einen Test gebaut. Allerdings verwende ich nur FXMLs (ich baue sie aber nicht mit dem SceneBuilder, sondern sie werden bei mir aus FXGraph-Dateien erstellt - FXGraph ist eine DSL aus dem e(fx)clipse-Plugin für die JavaFX-Entwicklung unter Eclipse). Aber eigentlich spielt das keine Rolle, denn:
Dein Probleme scheinen durch die Row- und ColumnConstraints zu entstehen. Habe dazu mal ein FXML mit 3 Zeilen und Spalten erstellt und Constraints wie du verwendet:
[XML]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Do not edit this file it is generated by e(fx)clipse from ../src/application/GridPaneTest.fxgraph
-->
<?import java.lang.*?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.StackPane?>
<StackPane xmlns:fx="http://javafx.com/fxml">
<GridPane>
<Label style="-fx-background-color: red;" text="Zeile 1, Spalte 1" GridPane.rowIndex="1" GridPane.columnIndex="1" GridPane.hgrow="ALWAYS">
<maxWidth><Double fx:constant="MAX_VALUE" /></maxWidth>
</Label>
<Label style="-fx-background-color: blue;" text="Zeile 1, Spalte 2" GridPane.rowIndex="1" GridPane.columnIndex="2" GridPane.hgrow="ALWAYS">
<maxWidth><Double fx:constant="MAX_VALUE" /></maxWidth>
</Label>
<Label style="-fx-background-color: yellow;" text="Zeile 1, Spalte 3" GridPane.rowIndex="1" GridPane.columnIndex="3" GridPane.hgrow="ALWAYS">
<maxWidth><Double fx:constant="MAX_VALUE" /></maxWidth>
</Label>
<Label style="-fx-background-color: grey;" text="Zeile 2, Spalte 1" GridPane.rowIndex="2" GridPane.columnIndex="1" GridPane.hgrow="ALWAYS">
<maxWidth><Double fx:constant="MAX_VALUE" /></maxWidth>
</Label>
<Label style="-fx-background-color: green;" text="Zeile 2, Spalte 2" GridPane.rowIndex="2" GridPane.columnIndex="2" GridPane.hgrow="ALWAYS">
<maxWidth><Double fx:constant="MAX_VALUE" /></maxWidth>
</Label>
<Label style="-fx-background-color: orange;" text="Zeile 2, Spalte 3" GridPane.rowIndex="2" GridPane.columnIndex="3" GridPane.hgrow="ALWAYS">
<maxWidth><Double fx:constant="MAX_VALUE" /></maxWidth>
</Label>
<Label style="-fx-background-color: pink;" text="Zeile 3, Spalte 1" GridPane.rowIndex="3" GridPane.columnIndex="1" GridPane.hgrow="ALWAYS">
<maxWidth><Double fx:constant="MAX_VALUE" /></maxWidth>
</Label>
<Label style="-fx-background-color: silver;" text="Zeile 3, Spalte 2" GridPane.rowIndex="3" GridPane.columnIndex="2" GridPane.hgrow="ALWAYS">
<maxWidth><Double fx:constant="MAX_VALUE" /></maxWidth>
</Label>
<Label style="-fx-background-color: magenta;" text="Zeile 3, Spalte 3" GridPane.rowIndex="3" GridPane.columnIndex="3" GridPane.hgrow="ALWAYS">
<maxWidth><Double fx:constant="MAX_VALUE" /></maxWidth>
</Label>
<rowConstraints>
<RowConstraints prefHeight="30"/>
<RowConstraints prefHeight="30"/>
<RowConstraints prefHeight="30"/>
</rowConstraints>
<columnConstraints>
<ColumnConstraints percentWidth="20"/>
<ColumnConstraints percentWidth="20"/>
<ColumnConstraints percentWidth="20"/>
</columnConstraints>
</GridPane>
</StackPane>
[/XML]
Im Ergebnis sind zwar die Zellen ausgefüllt, aber sie sind völlig wirr angeordnet.
Das selbe ohne Constraints sieht dann Erwartungskonform aus:
[XML]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Do not edit this file it is generated by e(fx)clipse from ../src/application/GridPaneTest.fxgraph
-->
<?import java.lang.*?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.StackPane?>
<StackPane xmlns:fx="http://javafx.com/fxml">
<GridPane>
<Label style="-fx-background-color: red;" text="Zeile 1, Spalte 1" GridPane.rowIndex="1" GridPane.columnIndex="1" GridPane.hgrow="ALWAYS">
<maxWidth><Double fx:constant="MAX_VALUE" /></maxWidth>
</Label>
<Label style="-fx-background-color: blue;" text="Zeile 1, Spalte 2" GridPane.rowIndex="1" GridPane.columnIndex="2" GridPane.hgrow="ALWAYS">
<maxWidth><Double fx:constant="MAX_VALUE" /></maxWidth>
</Label>
<Label style="-fx-background-color: yellow;" text="Zeile 1, Spalte 3" GridPane.rowIndex="1" GridPane.columnIndex="3" GridPane.hgrow="ALWAYS">
<maxWidth><Double fx:constant="MAX_VALUE" /></maxWidth>
</Label>
<Label style="-fx-background-color: grey;" text="Zeile 2, Spalte 1" GridPane.rowIndex="2" GridPane.columnIndex="1" GridPane.hgrow="ALWAYS">
<maxWidth><Double fx:constant="MAX_VALUE" /></maxWidth>
</Label>
<Label style="-fx-background-color: green;" text="Zeile 2, Spalte 2" GridPane.rowIndex="2" GridPane.columnIndex="2" GridPane.hgrow="ALWAYS">
<maxWidth><Double fx:constant="MAX_VALUE" /></maxWidth>
</Label>
<Label style="-fx-background-color: orange;" text="Zeile 2, Spalte 3" GridPane.rowIndex="2" GridPane.columnIndex="3" GridPane.hgrow="ALWAYS">
<maxWidth><Double fx:constant="MAX_VALUE" /></maxWidth>
</Label>
<Label style="-fx-background-color: pink;" text="Zeile 3, Spalte 1" GridPane.rowIndex="3" GridPane.columnIndex="1" GridPane.hgrow="ALWAYS">
<maxWidth><Double fx:constant="MAX_VALUE" /></maxWidth>
</Label>
<Label style="-fx-background-color: silver;" text="Zeile 3, Spalte 2" GridPane.rowIndex="3" GridPane.columnIndex="2" GridPane.hgrow="ALWAYS">
<maxWidth><Double fx:constant="MAX_VALUE" /></maxWidth>
</Label>
<Label style="-fx-background-color: magenta;" text="Zeile 3, Spalte 3" GridPane.rowIndex="3" GridPane.columnIndex="3" GridPane.hgrow="ALWAYS">
<maxWidth><Double fx:constant="MAX_VALUE" /></maxWidth>
</Label>
</GridPane>
</StackPane>
[/XML]
Ich würde dir empfehlen, FXMLs anstellen con Code zu verwenden - ich finde dass es im Code mitunter etwas in Frickelei ausartet.
Und ich muss noch dazusagen, dass das Hauptproblem die Columnconstraints sind, nicht die RowContraints...
Grüsse