Line line = new Line(); //instantiating Line class line.setStartX(0); //setting starting X point of Line line.setStartY(0); //setting starting Y point of Line line.setEndX(100); //setting ending X point of Line line.setEndY(200); //setting ending Y point of Line //Square with lines Line line1 = new Line(150,50,300,50); //Line(startX,startY,endX,endY) üst Line line2 = new Line(150,100,300,100); Line line3 = new Line(300,50,300,100); Line line4 = new Line(150,50,150,100); //Rectangle Rectangle rect=new Rectangle(); //instantiating Rectangle rect.setX(350); //setting the X coordinate of upper left //corner of rectangle rect.setY(20); //setting the Y coordinate of upper left //corner of rectangle rect.setWidth(100); //setting the width of rectangle rect.setHeight(100); // setting the height of rectangle //Arc Rectangle Rectangle rect2=new Rectangle(); rect2.setX(500); rect2.setY(20); rect2.setWidth(100); rect2.setHeight(100); rect2.setArcHeight(35); rect2.setArcWidth(35); rect2.setFill(Color.RED); //Ellipse Ellipse elipse = new Ellipse(); elipse.setCenterX(700); elipse.setCenterY(100); elipse.setRadiusX(50); elipse.setRadiusY(80); //Arc Arc arc = new Arc(); arc.setCenterX(100); arc.setCenterY(400); arc.setRadiusX(50); arc.setRadiusY(80); arc.setStartAngle(30); arc.setLength(70); arc.setType(ArcType.ROUND); arc.setFill(Color.RED); //Circle Circle circle = new Circle(); circle.setCenterX(250); circle.setCenterY(300); circle.setRadius(100); circle.setFill(Color.RED); //Polygon Polygon polygon = new Polygon(); polygon.getPoints().addAll(700.0, 350.0, 500.0, 400.0, 400.0, 200.0); //CubicCurve CubicCurve c = new CubicCurve(); c.setStartX(720); c.setStartY(350); c.setControlX1(300); c.setControlX2(500); c.setControlY1(100); c.setControlY2(200); c.setFill(Color.RED); c.setEffect(new DropShadow()); c.setEndX(900); c.setEndY(350); //Quad Curve QuadCurve q = new QuadCurve(); q.setStartX(10); q.setStartY(450); q.setControlX(25); q.setControlY(50); q.setFill(Color.RED); q.setEffect(new DropShadow()); q.setEndX(150); q.setEndY(700); //Rectangle Rectangle rect3 = new Rectangle(); rect3.setX(200); rect3.setY(500); rect3.setWidth(100); rect3.setHeight(150); int red=20; int green=125; int blue=10; rect3.setFill(Color.rgb(red, green, blue,0.63)); //Rectangle Rectangle rect4 = new Rectangle(); rect4.setX(350); rect4.setY(500); rect4.setWidth(100); rect4.setHeight(150); rect4.setFill(Color.RED); rect4.setEffect(new DropShadow()); Rectangle rect5 = new Rectangle(); rect5.setX(500); rect5.setY(500); rect5.setWidth(50); rect5.setHeight(150); rect5.setEffect(new DropShadow()); rect5.setFill(Color.web("#0000FF",1)); Text text = new Text(); text.setText("Hello !! Welcome to JavaTPoint"); text.setLayoutX(600); text.setLayoutY(550); Text text2 = new Text(); text2.setX(600); text2.setY(500); text2.setFont(Font.font("Abyssinica SIL", FontWeight.BOLD, FontPosture.REGULAR,20)); text2.setText("Welcome to JavaTPoint"); Text text3 = new Text(); text3.setX(600); text3.setY(650); text3.setFont(Font.font("Abyssinica SIL",FontWeight.BOLD,FontPosture.REGULAR,25)); text3.setFill(Color.BLUE);// setting colour of the text to blue text3.setStroke(Color.BLACK); // setting the stroke for the text text3.setStrokeWidth(1); // setting stroke width to 2 text3.setText("Welcome to JavaTPoint"); //Strike Text text4 = new Text(); text4.setX(600); text4.setY(600); text4.setFont(Font.font("Liberation Serif",25)); text4.setText("Hello !!"); text4.setStrikethrough(true); //Underline text Text text5=new Text(); text5.setX(600); text5.setY(700); text5.setText("Welcome to JavaTPoint!"); text5.setFont(Font.font("Liberation Serif",25)); text5.setUnderline(true); Group root = new Group(); root.getChildren().addAll(line,line1,line2,line3,line4,rect,rect2, elipse,arc,circle,polygon,c,q,rect3,rect4,rect5,text,text2,text3,text4,text5); Scene scene = new Scene(root, 1000, 750, Color.BLUEVIOLET); stage.setTitle("Hello!"); stage.setScene(scene); stage.show();