Deck 15: Creating GUI Applications With Javafx and Scene Builder

Full screen (f)
exit full mode
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
Use Space or
up arrow
down arrow
to flip the card.
Question
This is a markup language that describes the components in a JavaFX scene graph.

A) SGML
B) HTML
C) XML
D) FXML
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
The Application class's ________ method is the main entry point for a JavaFx application.

A) start
B) init
C) addWindow
D) mainFX
Question
In JavaFX, this component is commonly used as a GUI's root node.

A) List
B) AnchorPane
C) Button
D) ComboBox
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
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
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
This Scene Builder panel allows you to work with a component's properties, layout, and code.

A) Library Panel
B) Document Panel
C) Inspector Panel
D) Content Panel
Question
This is a component that can hold other components inside of it.

A) Container
B) Module
C) Node
D) Element
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
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
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
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
To place a component in a GUI, you simply drag it from the Library Panel, and drop it into the:

A) Content Panel
B) Document Panel
C) Selection Bar
D) Inspector Panel
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 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 variable references the window that the GUI will be displayed in.

A) window
B) stage
C) component
D) frame
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
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
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
Like RadioButtons, CheckBoxes may be selected or deselected at run time.
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
In addition to accepting input from the keyboard, GUIs typically accept input from a mouse, or a touch screen.
Question
In a scene graph, the root node and branch nodes can have children, but leaf nodes cannot.
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
Even if a variable will not reference a component in the GUI, it is necessary to precede the declaration by the @FMXL annotation.
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
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
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
________ are useful when you want the user to select one choice from several possible options.

A) RadioButtons
B) CheckBoxes
C) Buttons
D) Labels
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
You can use this component to display images in an application's GUI.

A) Label
B) ImageView
C) AnchorPane
D) ComboBox
Question
You can write a JavaFX GUI application using nothing but Java code.
Question
A simple ________ application uses a main application class, and a controller class.

A) Java
B) JavaFX
C) AWT
D) Swing
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
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
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 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
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 15: Creating GUI Applications With Javafx and Scene Builder
1
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
A
2
This is a markup language that describes the components in a JavaFX scene graph.

A) SGML
B) HTML
C) XML
D) FXML
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
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
5
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
6
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
7
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
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
This Scene Builder panel allows you to work with a component's properties, layout, and code.

A) Library Panel
B) Document Panel
C) Inspector Panel
D) Content Panel
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
10
This is a component that can hold other components inside of it.

A) Container
B) Module
C) Node
D) Element
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
11
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
12
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
13
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
14
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
15
To place a component in a GUI, you simply drag it from the Library Panel, and drop it into the:

A) Content Panel
B) Document Panel
C) Selection Bar
D) Inspector Panel
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
16
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
17
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
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
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
20
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
21
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
22
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
23
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
24
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
25
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
26
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
27
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
28
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
29
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
30
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
31
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
32
________ 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
33
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
34
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
35
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
36
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
37
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
38
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
39
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
40
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
locked card icon
Unlock Deck
Unlock for access to all 40 flashcards in this deck.