RectAngle_2DShape1
 
Code:

package javafxtemplate1;
//Grid_Transform1.htm
//textProperty().addListener Listview Label
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.stage.Stage;
import javafx.scene.layout.Pane;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;

/**
*
* @author Manas9
*/
public class JavaFXTemplate1 extends Application {

@Override
public void start(Stage primaryStage) throws Exception {
//Node str1 = new Node(" xxx ");
Pane root = new Pane();
Rectangle rect1 = new Rectangle(100, 50, 100, 50);
rect1.setFill(Color.LIGHTGRAY);
Rectangle rect2 = new Rectangle(220, 120, 100, 50);
rect2.setFill(Color.BROWN);

//
root.getChildren().addAll(rect1, rect2);
Scene scene = new Scene(root, 450,300);
primaryStage.setScene(scene);
primaryStage.setTitle("Layout Control::GridPane");
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}

Displays: