Write the missing JavaFX code to produce the following GUI. public void start(Stage primaryStage) { ________ r =new _________(); r.setWidth(40); r.setHeight(90); Button btn = new Button(); btn.__________("Rotate'"); btn.__________(new ___________() { public void ______(______ event) { r._________ (r._______()+15); } }); BorderPane root = new BorderPane(); root.___________(r); root.___________(btn); BorderPane.setAlignment(btn, Pos.CENTER); Scene scene = new Scene(root, 300, 250); primaryStage.setTitle("Rectangle with Rotate Button"); primaryStage.setScene(scene); primaryStage.show(); }
. Write the missing JavaFX code to produce the following GUI.
public void start(Stage primaryStage) {
________ r =new _________();
r.setWidth(40);
r.setHeight(90);
Button btn = new Button();
btn.__________("Rotate'");
btn.__________(new ___________<ActionEvent>() {
public void ______(______ event) {
r._________ (r._______()+15);
}
});
BorderPane root = new BorderPane();
root.___________(r);
root.___________(btn);
BorderPane.setAlignment(btn, Pos.CENTER);
Scene scene = new Scene(root, 300, 250);
primaryStage.setTitle("Rectangle with Rotate Button");
primaryStage.setScene(scene);
primaryStage.show();
}
![| Rectangle with Rotate Button
Rotate](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F35d02857-ff74-4ae3-a560-3f72cc10cce1%2Fabeb75dd-d396-4a56-85c6-9ff304f0f701%2Fvu49sjg_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)