Question: Revise Listing 18.9 to develop a program that lets the user use the + and ? buttons to increase or decrease the current order by

Revise Listing 18.9 to develop a program that lets the user use the + and ? buttons to increase or decrease the current order by 1, as shown in Figure 18.12a. The initial order is 0. If the current order is 0, the Decrease button is ignored.(a) 1 import javafx.application. Application; 2 import javafx.geometry.Point2D; 3 import javafx.geometry. Pos;

Listing

4 import javafx.scene.Scene; 5 import javafx.scene.control.Label; 6 import javafx.scene.contro1.TextField; 7 import javafx.scene.layout.BorderPane;

8 import javafx.scene.layout. HBox; 9 import javafx.scene.layout.Pane; |10 import javafx.scene.paint.Color; |11 import

javafx.scene.shape. Polygon; |12 import javafx.stage.Stage; |13 14 public class SierpinskiTriangle extends Application

(a) 1 import javafx.application. Application; 2 import javafx.geometry.Point2D; 3 import javafx.geometry. Pos; 4 import javafx.scene.Scene; 5 import javafx.scene.control.Label; 6 import javafx.scene.contro1.TextField; 7 import javafx.scene.layout.BorderPane; 8 import javafx.scene.layout. HBox; 9 import javafx.scene.layout.Pane; |10 import javafx.scene.paint.Color; |11 import javafx.scene.shape. Polygon; |12 import javafx.stage.Stage; |13 14 public class SierpinskiTriangle extends Application { 15 @Override // Override the start method in the Application class 16 public void start(Stage primaryStage) { SierpinskiTrianglePane trianglePane = new SierpinskiTrianglePane (); TextField tforder = new TextField(); tfOrder.setOnAction( 17 18 19

Step by Step Solution

3.35 Rating (173 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Output A program to demonstrate Sierpinski Triangle in a ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Java Programming Questions!