Stage_Scene_Pane1
javafx.scene.layout

Class Pane

 
  Code : NewWindow

package javafxtemplate1;

import javafx.application.Application;

import javafx.scene.Scene;
//import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.layout.Pane;
import javafx.scene.paint.Color;
import javafx.scene.shape.Circle;
import javafx.scene.shape.Rectangle;
import javafx.stage.Stage;

/**
 *Stage_Scene_Pane1.txt
 * @author Manas14
 */

public class JavaFXTemplate1 extends Application {
   
    @Override
    public void start(Stage primaryStage) {
        //comparing Group with Pane :: doc 2
        //Pane is Resizable to Sizable setPrefSize
    //Group canvas = new Group();

    Pane canvas = new Pane();
     canvas.setStyle("-fx-background-color: white;");
     canvas.setPrefSize(200,200);
     Label label1 = new Label("Scence is Title Free");
     Circle circle = new Circle(50,Color.BLUE);
     circle.relocate(20, 20);
     Rectangle rectangle = new Rectangle(100,100,Color.GREEN);
     rectangle.relocate(70,70);
     label1.relocate(100, 10);// x = 100, y height = 10
     canvas.getChildren().addAll(circle,rectangle, label1);
     Scene scene = new Scene(canvas,300,200);
     // scene.setTitle("Group or Pane:: canvas");
     // Above is not allowed
    primaryStage.setScene(scene);
    primaryStage.setTitle("Stage Pane :: Controls");
    primaryStage.show();
    }

    public static void main(String[] args) {
        launch(args);
    }
   
}

Runtime display ::