Modify this program and draw something interesting. Maybe a car, a character, a tree, a happy face or anything else you like. Have at least 3 or 4 drawing commands in the program. Do some research on the Oracle web site to see what other JavaFX shapes you can include. package drawShapesPKG; import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.layout.Pane; import javafx.scene.paint.Color; import javafx.scene.shape.Circle; import javafx.scene.shape.Rectangle; import javafx.scene.shape.Shape; import javafx.stage.Stage; public class DrawShapes extends Application { @Override // Override the start method in the Application class public void start(Stage primaryStage) { // Create a circle and set its properties Circle circle = new Circle(); circle.setCenterX(100); circle.setCenterY(100); circle.setRadius(50); circle.setStroke(Color.BLACK); circle.setStrokeWidth(3.0); circle.setFill(Color.BLUE);    Rectangle r = new Rectangle(); r.setX(250); r.setY(50); r.setWidth(200); r.setHeight(100); r.setArcWidth(20); r.setArcHeight(20); r.setFill(Color.RED);    // Create a pane to hold the circle Pane pane = new Pane(); pane.getChildren().add(circle);    pane.getChildren().add(r);       // Create a scene and place it in the stage Scene scene = new Scene(pane, 500, 200); primaryStage.setTitle("Draw Shapes"); // Set the stage title primaryStage.setScene(scene); // Place the scene in the stage primaryStage.show(); // Display the stage }    void DrawMyStuff(Pane myPane, Shape myShape) { myPane.getChildren().add(myShape); }          /** * The main method is only needed for the IDE with limited * JavaFX support. Not needed for running from the command line. */ public static void main(String[] args) { launch(args); }

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Java

Modify this program and draw something interesting. Maybe a car, a character, a tree, a happy face or anything else you like. Have at least 3 or 4 drawing commands in the program. Do some research on the Oracle web site to see what other JavaFX shapes you can include.

package drawShapesPKG;

import javafx.application.Application;

import javafx.scene.Scene;

import javafx.scene.layout.Pane;

import javafx.scene.paint.Color;

import javafx.scene.shape.Circle;

import javafx.scene.shape.Rectangle;

import javafx.scene.shape.Shape;

import javafx.stage.Stage;

public class DrawShapes extends Application {

@Override // Override the start method in the Application class

public void start(Stage primaryStage) {

// Create a circle and set its properties

Circle circle = new Circle();

circle.setCenterX(100);

circle.setCenterY(100);

circle.setRadius(50);

circle.setStroke(Color.BLACK);

circle.setStrokeWidth(3.0);

circle.setFill(Color.BLUE);

  

Rectangle r = new Rectangle();

r.setX(250);

r.setY(50);

r.setWidth(200);

r.setHeight(100);

r.setArcWidth(20);

r.setArcHeight(20);

r.setFill(Color.RED);

  

// Create a pane to hold the circle

Pane pane = new Pane();

pane.getChildren().add(circle);

  

pane.getChildren().add(r);

  

  

// Create a scene and place it in the stage

Scene scene = new Scene(pane, 500, 200);

primaryStage.setTitle("Draw Shapes"); // Set the stage title

primaryStage.setScene(scene); // Place the scene in the stage

primaryStage.show(); // Display the stage

}

  

void DrawMyStuff(Pane myPane, Shape myShape)

{

myPane.getChildren().add(myShape);

}

  

  

  

/**

* The main method is only needed for the IDE with limited

* JavaFX support. Not needed for running from the command line.

*/

public static void main(String[] args) {

launch(args);

}

  

  Extra credit will be given if you include many different shapes and text. Include different fonts and different styles (Bold, Italic etc.) Be creative

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Similar questions
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY