Verified Solutions
Which of the following statements are true?
A. A primary stage is automatically created when a JavaFX main class is launched.
B. You can have multiple stages displayed in a JavaFX program.
C. A stage is displayed by invoking the show() method on the stage.
D. A scene is placed in the stage using the addScene method
E. A scene is placed in the stage using the setScene method ✔️✔️A. A primary stage is
automatically created when a JavaFX main class is launched.
B. You can have multiple stages displayed in a JavaFX program.
C. A stage is displayed by invoking the show() method on the stage.
E. A scene is placed in the stage using the setScene method
Which of the following statements are true?
A. A Scene is a Node.
B. A Shape is a Node.
C. A Stage is a Node.
D. A Control is a Node.
E. A Pane is a Node. ✔️✔️B. A Shape is a Node.
D. A Control is a Node.
E. A Pane is a Node.
Which of the following statements correctly creates a Color object?
A. new Color(3, 5, 5, 1);
,B. new Color(0.3, 0.5, 0.5, 0.1);
C. new Color(0.3, 0.5, 0.5);
D. Color.color(0.3, 0.5, 0.5);
E. Color.color(0.3, 0.5, 0.5, 0.1); ✔️✔️B. new Color(0.3, 0.5, 0.5, 0.1);
D. Color.color(0.3, 0.5, 0.5);
E. Color.color(0.3, 0.5, 0.5, 0.1);
Which of the following statements correctly creates a Font object?
A. new Font(34);
B. new Font("Times", 34);
C. Font.font("Times", 34);
D. Font.font("Times", FontWeight.NORMAL, 34);
E. Font.font("Times", FontWeight.NORMAL, FontPosture.ITALIC, 34); ✔️✔️A. new Font(34);
B. new Font("Times", 34);
C. Font.font("Times", 34);
D. Font.font("Times", FontWeight.NORMAL, 34);
E. Font.font("Times", FontWeight.NORMAL, FontPosture.ITALIC, 34);
Which of the following statements correctly creates an ImageView object?
A. new ImageView("http://www.cs.armstrong.edu/liang/image/us.gif");
B. new ImageView(new Image("http://www.cs.armstrong.edu/liang/image/us.gif"));
C. new ImageView("image/us.gif");
D. new ImageView(new Image("image/us.gif")); ✔️✔️A. new
ImageView("http://www.cs.armstrong.edu/liang/image/us.gif");
B. new ImageView(new Image("http://www.cs.armstrong.edu/liang/image/us.gif"));
C. new ImageView("image/us.gif");
D. new ImageView(new Image("image/us.gif"));
, Which of the following statements correctly rotates the button 45 degrees counterclockwise?
A. button.setRotate(45);
B. button.setRotate(Math.toRadians(45));
C. button.setRotate(360 - 45);
D. button.setRotate(-45) ✔️✔️C. button.setRotate(360 - 45);
D. button.setRotate(-45);
Which of the following statements correctly sets the fill color of circle to black?
A. circle.setFill(Color.BLACK);
B. circle.setFill(Color.black);
C. circle.setStyle("-fx-fill: black");
D. circle.setStyle("fill: black");
E. circle.setStyle("-fx-fill-color: black"); ✔️✔️A. circle.setFill(Color.BLACK);
C. circle.setStyle("-fx-fill: black");
Why is JavaFX preferred?
A. JavaFX is much simpler to learn and use for new Java programmers.
B. JavaFX provides a multi-touch support for touch-enabled devices such as tablets and smart
phones.
C. JavaFX has a built-in 3D, animation support, video and audio playback, and runs as a
standalone application or from a browser.
D. JavaFX incorporates modern GUI technologies to enable you to develop rich Internet
applications. ✔️✔️A. JavaFX is much simpler to learn and use for new Java programmers.
B. JavaFX provides a multi-touch support for touch-enabled devices such as tablets and smart
phones.
C. JavaFX has a built-in 3D, animation support, video and audio playback, and runs as a
standalone application or from a browser.