import javafx.application.Application; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.paint.Color; import javafx.scene.shape.Circle; import javafx.scene.transform.Scale; import javafx.stage.Stage; publicclassScalingExampleextendsApplication { @Override publicvoidstart(Stage stage) { //Drawing Circle1 Circlecircle1=newCircle(300, 135, 50); //Setting the color of the circle circle1.setFill(Color.BLUE); //Setting the stroke width of the circle circle1.setStrokeWidth(20); //Drawing Circle2 Circlecircle2=newCircle(300, 135, 50); //Setting the color of the circle circle2.setFill(Color.BURLYWOOD); //Setting the stroke width of the circle circle2.setStrokeWidth(20); //Creating the scale transformation Scalescale=newScale(); //Setting the dimensions for the transformation scale.setX(1.5); scale.setY(1.5); //Setting the pivot point for the transformation scale.setPivotX(300); scale.setPivotY(135); //Adding the scale transformation to circle1 circle1.getTransforms().addAll(scale); //Creating a Group object Grouproot=newGroup(circle1, circle2); //Creating a scene object Scenescene=newScene(root, 600, 300); //Setting title to the Stage stage.setTitle("Scaling transformation example"); //Adding scene to the stage stage.setScene(scene); //Displaying the contents of the stage stage.show(); } publicstaticvoidmain(String args[]){ launch(args); } }