JavaFX Programming: Revision Questions and Answers, Exams of Computer Programming

A set of revision questions and answers covering key concepts in javafx programming. It explores topics such as gui elements, styling, and event handling. The questions are designed to test understanding of fundamental javafx concepts and their practical application.

Typology: Exams

2024/2025

Available from 03/25/2025

victor-kiragu
victor-kiragu 🇺🇸

209 documents

1 / 5

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Starting out with Java - Chapter 13 Revision
Questions
A ____ is like a TextField that can accept multiple lines of input.
A. TextArea
B. MultilineTextField
C. ExpandableTextField
D. TextEditorField A. TextArea
Adding RadioButton controls to this type of object creates a mutually
exclusive relationship between them.
A. MutualExclude
B. RadioGroup
C. LogicalGroup
D. ToggleGroup D. ToggleGroup
Both the ListView control and the ComboBox control keeps its list of items
in a(n) ____object.
A. ArrayList
B. ExpandableList
C. ItemList
D. ObservableList D. ObservableList
If you want to apply styles to all of the nodes in a scene, use the____
selector.
A. .all-nodes
B. .stage
C. .home
D. .root D. .root
pf3
pf4
pf5

Partial preview of the text

Download JavaFX Programming: Revision Questions and Answers and more Exams Computer Programming in PDF only on Docsity!

Starting out with Java - Chapter 13 Revision

Questions

A ____ is like a TextField that can accept multiple lines of input. A. TextArea B. MultilineTextField C. ExpandableTextField D. TextEditorField ✓A. TextArea Adding RadioButton controls to this type of object creates a mutually exclusive relationship between them. A. MutualExclude B. RadioGroup C. LogicalGroup D. ToggleGroup ✓D. ToggleGroup Both the ListView control and the ComboBox control keeps its list of items in a(n) ____object. A. ArrayList B. ExpandableList C. ItemList D. ObservableList ✓D. ObservableList If you want to apply styles to all of the nodes in a scene, use the____ selector. A. .all-nodes B. .stage C. .home D. .root ✓D. .root

In the hexadecimal color value #05AAFF, the AA value specifies which color component? A. red B. green C. blue D. magenta ✓B. green The ___ CSS property is used to change a control's background color in a JavaFX application. A. -fx-color B. -fx-background-color C. -fx-color-background D. -fx-bg-color ✓B. -fx-background-color The ___control displays a list of items and allows the user to select one or more items from the list. A. DropList B. ListView C. ViewList D. ItemList ✓B. ListView The____control presents its items in a drop-down list. A. DropList B. ListView C. ComboBox D. ItemList ✓C. ComboBox This RadioButton method returns true if this control is selected. A. selected()

What style definition applies a background color of #0000FF to all Button controls? A. .button { -fx-background-color: #0000FF; } B. .button { -fx-bg-color = #0000FF; } C. .button.all { -fx-background-color: #0000FF; } D. .global {button: -fx-background-color: #0000FF; } ✓A. .button { -fx- background-color: #0000FF; } When a selector name starts with a period in a JavaFX CSS style definition, it means the selector corresponds to ____. A. specific variable names in the application B. specific types of JavaFX nodes C. values that the user enters D. named constants in the application ✓B. specific types of JavaFX nodes When you define a color in CSS, you specify an integer value in the range of ___ for each of the color components (red, green, and blue). A. 0 through 255 B. 0 through 1024 C. −255−255 through 255 D. 0 through 128 ✓A. 0 through 255 Which of these is written in the correct syntax for a CSS style definition? A. {.label: -fx-font-size: 20pt; } B. .label { -fx-font-size=20pt; } C. .label { -fx-font-size: 20pt; } D. {.label; -fx-font-size: 20pt; } ✓C. .label { -fx-font-size: 20pt; } You use this class to create a menu bar.

A. MenuItem B. MenuBar C. Menu D. Bar ✓B. MenuBar You use this class to create a radio menu item. A. MenuItem B. RadioButton C. RadioItem D. RadioMenuItem ✓D. RadioMenuItem