Java Reference
In-Depth Information
},
]
}
},
text = Text {
translateX:
bind (stage.width-
text.boundsInLocal.width)/2
translateY: bind stage.height /2
content: "Hello World"
effect: Reflection { fraction: 0.7}
font: Font {name:"ArialBold", size: 64}
}
]
}
}
Distributing the Application
To compile the entire project, click on the Project MyFirstJavaFXApplication in
the Projects tab on the left of the NetBeans IDE screen. When the project is high-
lighted, click with the right mouse button to bring up a menu of options, select
Build Project . This automatically saves all updated source files for the project,
compiles the JavaFX Script and any Java source files, and then places the class
files into a Java Archive (JAR) file underneath the dist directory. Besides gener-
ating the JAR file to run the application locally either from a desktop launcher or
command line, it also generates support files for using the application as a Java
Applet in a browser and for using it with the Java Web Start launcher either within
a browser or from the desktop. These two options will be explained in detail in
Chapter 9 . Figure 1.7 shows the project menu with the Build Project item selected.
Figure 1.7
Build JavaFX Project
 
 
Search WWH ::




Custom Search