Deck 14: Creating GUI Applications with JavaFX

Full screen (f)
exit full mode
Question
This is a component that can hold other components inside of it.

A) Container
B) Module
C) Node
D) Element
Use Space or
up arrow
down arrow
to flip the card.
Question
A(n) ________ is a method that automatically executes when a specific event occurs.

A) flag register
B) action scheduler
C) callback routine
D) event listener
Question
The ________ is responsible for handling events that occur while the JavaFX application is running.

A) abstract class
B) main application class
C) controller class
D) super class
Question
This is an action that takes place within a program, such as the clicking of a button.

A) response
B) input
C) event
D) incident
Question
This is a markup language that describes the components in a JavaFX scene graph.

A) SGML
B) HTML
C) XML
D) FXML
Question
A window in a GUI commonly consists of several ________ that present data to the user and/or allow interaction with the application.

A) modules
B) components
C) elements
D) buttons
Question
In JavaFX, this component is commonly used as a GUI's root node.

A) List
B) AnchorPane
C) Button
D) ComboBox
Question
This is a special annotation that must precede any nonpublic field declaration or nonpublic method definition that is used by the FXML file.

A) @FXML
B) finalFX
C) fx:id
D) #FXML
Question
The Scene Builder ________ provides a list of JavaFX components that you can use in an application.

A) Inspector Panel
B) Menu Bar
C) Content Panel
D) Library Panel
Question
Which of the following does not belong in a JavaFX scene graph?

A) trunk node
B) branch node
C) leaf node
D) root node
Question
Once you have created a GUI with Scene Builder, and saved it to an FXML file, you need to write a Java class that performs which of the following?

A) loads the FXML file
B) builds the scene graph in memory
C) displays the GUI
D) All of the above
Question
To place a component in a GUI, you simply drag it from the Library Panel, and drop it into the

A) Content Panel.
B) Hierarchy Panel.
C) Selection Bar.
D) Inspector Panel.
Question
This is a name that identifies a component in the FXML file and will also become a variable name that you can use later in the Java code that you will write to run the application.

A) fx:id
B) fx_id
C) FXID
D) fx.URL
Question
Which of the following import statements is necessary to make the connection between the controller class and the application's FXML file?

A) import javafx.lang;
B) import javafx.scene.control;
C) import javafx.fxml;
D) import javafx.fxml.FXML;
Question
A ________ is a tree-like, hierarchical data structure that contains nodes.

A) scene graph
B) class hierarchy
C) UML diagram
D) tree graph
Question
Oracle provides a free design tool named ________ that you can use to visually create a GUI.

A) EclipseLink
B) JavaFX
C) Scene Builder
D) Oracle ADF Essentials
Question
The Application class's ________ method is the main entry point for a JavaFx application.

A) start
B) init
C) addWindow
D) mainFX
Question
This variable references the window that the GUI will be displayed in.

A) window
B) stage
C) component
D) frame
Question
This is a graphical window or a system of graphical windows presented by an application for interaction with the user.

A) graphical user interface (GUI)
B) human-computer interface (HCI)
C) man-machine interface (MMI)
D) object-oriented user interface (OOUI)
Question
This Scene Builder panel allows you to work with a component's properties, layout, and code.

A) Library Panel
B) Hierarchy Panel
C) Inspector Panel
D) Content Panel
Question
In the controller class, you can use the CheckBox's ________ method to determine whether the CheckBox is selected or not.

A) getIndex
B) isActive
C) isChecked
D) isSelected
Question
A simple ________ application uses a main application class, and a controller class.

A) Java
B) JavaFX
C) AWT
D) Swing
Question
Even if a variable will not reference a component in the GUI, it is necessary to precede the declaration by the @FMXL annotation.
Question
Although these are often displayed in groups, they are not usually grouped in a toggle group like RadioButtons are.

A) Labels
B) CheckBoxes
C) Buttons
D) TextFields
Question
To change the image being displayed in an ImageView component as the application is running, you pass a reference to an Image object as an argument to this method.

A) setImage
B) replaceImage
C) showImage
D) addImage
Question
Which of the following is true concerning the sample controller skeleton provided by Scene Builder?

A) It has all of the necessary import statements.
B) It has private field declarations for all of the components that have an fx:id.
C) You just need to change the name of the class, and write the code for the event listener methods.
D) All of the above
Question
In the controller class, you can use the RadioButton's ________ method to determine whether the RadioButton is selected or not.

A) isChecked
B) isPushed
C) isSelected
D) getIndex
Question
In a scene graph, the root node and branch nodes can have children, but leaf nodes cannot.
Question
Like RadioButtons, CheckBoxes may be selected or deselected at run time.
Question
________ are useful when you want the user to select one choice from several possible options.

A) RadioButtons
B) CheckBoxes
C) Buttons
D) Labels
Question
As an alternative for manually typing the code for the controller class, Scene Builder can provide a sample "skeleton" for the controller class.
Question
You can use this component to display images in an application's GUI.

A) Label
B) ImageView
C) AnchorPane
D) ComboBox
Question
Because only one RadioButton in a toggle group can be selected at any given time, the buttons are said to be this.

A) static components
B) singularly bound
C) all inclusive
D) mutually exclusive
Question
In JavaFX, the components that are in a GUI are organized as a UML diagram.
Question
FXML uses tags to organize data, in a manner similar to the way that HTML uses tags to format text in a Web browser.
Question
Once you have written and compiled the controller class, you must go back into Scene Builder and register the controller class to the application's GUI.
Question
You can use JavaFX to create standalone graphics applications that run on your local computer, applications that run from a remote server, or applications that are embedded in a Web page.
Question
This section of the Inspector Panel allows you to register the controller class and event listeners with the GUI.

A) Code
B) Properties
C) Layout
D) Content
Question
In addition to accepting input from the keyboard, GUIs typically accept input from a mouse, or a touch screen.
Question
You can write a JavaFX GUI application using nothing but Java code.
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/40
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 14: Creating GUI Applications with JavaFX
1
This is a component that can hold other components inside of it.

A) Container
B) Module
C) Node
D) Element
A
2
A(n) ________ is a method that automatically executes when a specific event occurs.

A) flag register
B) action scheduler
C) callback routine
D) event listener
D
3
The ________ is responsible for handling events that occur while the JavaFX application is running.

A) abstract class
B) main application class
C) controller class
D) super class
C
4
This is an action that takes place within a program, such as the clicking of a button.

A) response
B) input
C) event
D) incident
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
5
This is a markup language that describes the components in a JavaFX scene graph.

A) SGML
B) HTML
C) XML
D) FXML
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
6
A window in a GUI commonly consists of several ________ that present data to the user and/or allow interaction with the application.

A) modules
B) components
C) elements
D) buttons
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
7
In JavaFX, this component is commonly used as a GUI's root node.

A) List
B) AnchorPane
C) Button
D) ComboBox
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
8
This is a special annotation that must precede any nonpublic field declaration or nonpublic method definition that is used by the FXML file.

A) @FXML
B) finalFX
C) fx:id
D) #FXML
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
9
The Scene Builder ________ provides a list of JavaFX components that you can use in an application.

A) Inspector Panel
B) Menu Bar
C) Content Panel
D) Library Panel
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
10
Which of the following does not belong in a JavaFX scene graph?

A) trunk node
B) branch node
C) leaf node
D) root node
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
11
Once you have created a GUI with Scene Builder, and saved it to an FXML file, you need to write a Java class that performs which of the following?

A) loads the FXML file
B) builds the scene graph in memory
C) displays the GUI
D) All of the above
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
12
To place a component in a GUI, you simply drag it from the Library Panel, and drop it into the

A) Content Panel.
B) Hierarchy Panel.
C) Selection Bar.
D) Inspector Panel.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
13
This is a name that identifies a component in the FXML file and will also become a variable name that you can use later in the Java code that you will write to run the application.

A) fx:id
B) fx_id
C) FXID
D) fx.URL
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
14
Which of the following import statements is necessary to make the connection between the controller class and the application's FXML file?

A) import javafx.lang;
B) import javafx.scene.control;
C) import javafx.fxml;
D) import javafx.fxml.FXML;
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
15
A ________ is a tree-like, hierarchical data structure that contains nodes.

A) scene graph
B) class hierarchy
C) UML diagram
D) tree graph
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
16
Oracle provides a free design tool named ________ that you can use to visually create a GUI.

A) EclipseLink
B) JavaFX
C) Scene Builder
D) Oracle ADF Essentials
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
17
The Application class's ________ method is the main entry point for a JavaFx application.

A) start
B) init
C) addWindow
D) mainFX
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
18
This variable references the window that the GUI will be displayed in.

A) window
B) stage
C) component
D) frame
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
19
This is a graphical window or a system of graphical windows presented by an application for interaction with the user.

A) graphical user interface (GUI)
B) human-computer interface (HCI)
C) man-machine interface (MMI)
D) object-oriented user interface (OOUI)
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
20
This Scene Builder panel allows you to work with a component's properties, layout, and code.

A) Library Panel
B) Hierarchy Panel
C) Inspector Panel
D) Content Panel
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
21
In the controller class, you can use the CheckBox's ________ method to determine whether the CheckBox is selected or not.

A) getIndex
B) isActive
C) isChecked
D) isSelected
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
22
A simple ________ application uses a main application class, and a controller class.

A) Java
B) JavaFX
C) AWT
D) Swing
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
23
Even if a variable will not reference a component in the GUI, it is necessary to precede the declaration by the @FMXL annotation.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
24
Although these are often displayed in groups, they are not usually grouped in a toggle group like RadioButtons are.

A) Labels
B) CheckBoxes
C) Buttons
D) TextFields
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
25
To change the image being displayed in an ImageView component as the application is running, you pass a reference to an Image object as an argument to this method.

A) setImage
B) replaceImage
C) showImage
D) addImage
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
26
Which of the following is true concerning the sample controller skeleton provided by Scene Builder?

A) It has all of the necessary import statements.
B) It has private field declarations for all of the components that have an fx:id.
C) You just need to change the name of the class, and write the code for the event listener methods.
D) All of the above
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
27
In the controller class, you can use the RadioButton's ________ method to determine whether the RadioButton is selected or not.

A) isChecked
B) isPushed
C) isSelected
D) getIndex
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
28
In a scene graph, the root node and branch nodes can have children, but leaf nodes cannot.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
29
Like RadioButtons, CheckBoxes may be selected or deselected at run time.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
30
________ are useful when you want the user to select one choice from several possible options.

A) RadioButtons
B) CheckBoxes
C) Buttons
D) Labels
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
31
As an alternative for manually typing the code for the controller class, Scene Builder can provide a sample "skeleton" for the controller class.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
32
You can use this component to display images in an application's GUI.

A) Label
B) ImageView
C) AnchorPane
D) ComboBox
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
33
Because only one RadioButton in a toggle group can be selected at any given time, the buttons are said to be this.

A) static components
B) singularly bound
C) all inclusive
D) mutually exclusive
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
34
In JavaFX, the components that are in a GUI are organized as a UML diagram.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
35
FXML uses tags to organize data, in a manner similar to the way that HTML uses tags to format text in a Web browser.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
36
Once you have written and compiled the controller class, you must go back into Scene Builder and register the controller class to the application's GUI.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
37
You can use JavaFX to create standalone graphics applications that run on your local computer, applications that run from a remote server, or applications that are embedded in a Web page.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
38
This section of the Inspector Panel allows you to register the controller class and event listeners with the GUI.

A) Code
B) Properties
C) Layout
D) Content
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
39
In addition to accepting input from the keyboard, GUIs typically accept input from a mouse, or a touch screen.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
40
You can write a JavaFX GUI application using nothing but Java code.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 40 flashcards in this deck.