Java Reference
In-Depth Information
Servlets. If you will be writing high-powered web applications, then you will want to
learn about servlets. Servlets are to the server what applets are to the browser.
To continue your study of Java, I recommend my book Java: The Complete Reference,
Ninth Edition (Oracle Press/McGraw-Hill Professional, 2014). In it, you will find compre-
hensive coverage of the Java language, its key libraries, and many more example programs.
Chapter 17 Self Test
1 . What is the top-level package name of the JavaFX framework?
2 . Two concepts central to JavaFX are a stage and a scene. What classes encapsulate
them?
3 . A scene graph is composed of ________.
4 . The base class for all nodes is ________.
5 . What class will all JavaFX applications extend?
6 . What are the three JavaFX life-cycle methods?
7 . In what life-cycle method can you construct an application's stage?
8 . The launch( ) method is called to start a free-standing JavaFX application. True or
False?
9 . What are the names of the JavaFX classes that support a label and a 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.
11 . What JavaFX control implements a check box?
12 . ListView is a control that displays a directory list of files on the local file system.
True or False?
13 . Convert the Swing-based file comparison program in Try This 16-1 so it uses JavaFX
instead. In the process, make use of another of JavaFX's features: its ability to fire an
Search WWH ::




Custom Search