It seems to me, that GridPane calculates wrong height over its Nodes when I use rowspan.
// 01 - Half OK
final GridPane gp = new GridPane();
gp.add( new Text( "aaa\nbbb\nccc\nddd\neee" ), 0, 0, 1, 2 );
gp.add( new Text( "aaaa1" ), 1, 0, 1, 1 );
gp.add( new Text( "aaaa2" ), 1, 1, 1, 1 );
gp.setGridLinesVisible( true );
new VBox( 8, new Text( "text1" ), gp, new Text( "text2" ) );
"Half OK" because height of "aaaa1" and "aaaa2" differs. See the picture.
// 02 - BAD
final GridPane gp = new GridPane();
gp.add( new Text( "aaa\nbbb\nccc\nddd\neee" ), 0, 0, 1, 2 );
gp.add( new Text( "aaaa1" ), 1, 0, 1, 1 );
gp.add( new Text( "aaaa2" ), 1, 1, 1, 2 ); // '1' -> '2'
gp.setGridLinesVisible( true );
new VBox( 8, new Text( "text1" ), gp, new Text( "text2" ) );
// 03 - BAD
final GridPane gp = new GridPane();
gp.add( new Text( "aaa\nbbb\nccc\nddd\neee" ), 0, 0, 1, 3 );
gp.add( new Text( "aaaa1" ), 1, 0, 1, 1 );
gp.add( new Text( "aaaa2" ), 1, 1, 1, 2 );
gp.setGridLinesVisible( true );
new VBox( 8, new Text( "text1" ), gp, new Text( "text2" ) );
// 04 - BAD
final GridPane gp = new GridPane();
gp.add( new Text( "aaa\nbbb\nccc\nddd\neee" ), 0, 0, 1, 3 );
gp.add( new Text( "aaaa1" ), 1, 0, 1, 1 );
gp.add( new Text( "aaaa2" ), 1, 1, 1, 2 );
gp.add( new Text( "xxx11" ), 2, 0, 1, 1 );
gp.add( new Text( "xxx21" ), 2, 1, 1, 1 );
gp.add( new Text( "xxx22" ), 2, 2, 1, 1 );
gp.setGridLinesVisible( true );
new VBox( 8, new Text( "text1" ), gp, new Text( "text2" ) );
Is it JavaFX error or something can be fixed?