import javafx.application.Application; import javafx.scene.Group; import javafx.scene.Scene; import javafx.stage.Stage; import javafx.scene.shape.Rectangle; publicclassRoundedRectangleextendsApplication { @Override publicvoidstart(Stage stage) { //Drawing a Rectangle Rectanglerectangle=newRectangle(); //Setting the properties of the rectangle rectangle.setX(150.0f); rectangle.setY(75.0f); rectangle.setWidth(300.0f); rectangle.setHeight(150.0f); //Setting the height and width of the arc rectangle.setArcWidth(30.0); rectangle.setArcHeight(20.0); //Creating a Group object Grouproot=newGroup(rectangle); //Creating a scene object Scenescene=newScene(root, 600, 300); //Setting title to the Stage stage.setTitle("Drawing a Rectangle"); //Adding scene to the stage stage.setScene(scene); //Displaying the contents of the stage stage.show(); } publicstaticvoidmain(String args[]){ launch(args); } }