Game Development Reference
In-Depth Information
stalling a transparent background color/image plate for the design element), you have
used thus far three different method calls, passing three custom object types:
.initStyle(StageStyle object), .setFill(Color object), and .setBackground(Background
object).
This time, you are going to call the .setBackground(Background value) method,
with yet another Background class (object) constant, EMPTY . As Figure 4-8 illus-
trates, NetBeans will help you find the constant once you call the method off the Stack-
Pane object named root, using the following Java statement:
root.setBackground(Background.EMPTY); . NetBeans provides a method
selector drop-down and, once you select a method, an information dialog showing you
the origin (superclass) of the method as well as what it does and an in-depth descrip-
tion. In this case, null (nothing), or zero Color fill, or zero Image set equates to
TRANSPARENT. You are now ready to test your windowless (transparent) application
version by using the run project work process.
Figure 4-8 . Call a .setBackground() method with a Background.EMPTY constant, off the StackPane object named
root
 
 
Search WWH ::




Custom Search