public class GrowApp extends Application {

    @Override
    public void start(Stage primaryStage) throws Exception {

        VBox vbox = new VBox();

        Rectangle rect = new Rectangle(10, 10);
        rect.setFill(Color.BLUE);

        Rectangle rect2 = new Rectangle( 10, 10 );
        rect2.setFill( Color.RED );

        rect.widthProperty().bind( vbox.widthProperty() );
        rect.heightProperty().bind( vbox.heightProperty().divide(2) );

        rect2.widthProperty().bind( vbox.widthProperty() );
        rect2.heightProperty().bind( vbox.heightProperty().divide(2) );

        vbox.getChildren().addAll( rect, rect2 );

        Scene scene = new Scene(vbox);

        primaryStage.setScene( scene );
        primaryStage.setWidth( 800 );
        primaryStage.setHeight( 600 );
        primaryStage.show();
    }

    public static void main(String[] args) {
        launch(args);
    }
}