Java Reference
In-Depth Information
2 . Two concepts central to JavaFX are a stage and a scene. What classes encapsulate
them?
Stage and Scene
3 . A scene graph is composed of ________.
nodes
4 . The base class for all nodes is ________.
Node
5 . What class will all JavaFX applications extend?
Application
6 . What are the three JavaFX life-cycle methods?
init( ) , start( ) , and stop( )
7 . In what life-cycle method can you construct an application's stage?
start( )
8 . The launch( ) method is called to start a free-standing JavaFX application. True or
False?
True
9 . What are the names of the JavaFX classes that support a label and a button?
Label and Button
10 . One way to terminate a free-standing JavaFX application is to call Platform.exit( ) .
Platform is packaged in javafx.Application . When called, exit( ) immediately ter-
minates the program. With this in mind, change the JavaFXEventDemo program
shown in this chapter so that it has two buttons called Run and Exit. If Run is
pressed, have the program display that choice in a label. If Exit is pressed, have the
application terminate. Use lambda expressions for the event handlers.
Search WWH ::




Custom Search