Java Reference
In-Depth Information
the latest Apple release for the Java Platform from http://developer.apple.com/
java . As of writing this chapter, Java for Mac OS X 10.5 Update 3 now supports
Java 6 Update 7. This release from Apple still does not support the Applet drag
feature described in Chapter 9, Add JavaFX to Web Pages with Applets.
To create your first JavaFX Script application, you have several options. First,
you can download the NetBeans IDE for JavaFX 1.2 based on NetBeans IDE 6.5
from http://javafx.com . Or, from the same site, you can download the JavaFX
SDK and use your favorite editor, compile and run the JavaFX application from the
command line. If you choose to use Eclipse, download the JavaFX Plugin for Eclipse
from http://kenai.com/projects/eplugin after downloading the JavaFX SDK.
There is also a set of tools and plug-ins for designers to export graphical assets
into JavaFX applications, the JavaFX Production Suite. These will be discussed
in more detail in Chapter 2, JavaFX for the Graphic Designer, from http://
www.javafx.com.
Setting Up NetBeans IDE for JavaFX 1.2
You can install the NetBeans IDE for JavaFX 1.2 directly from javafx.com.
There are installers for Microsoft Windows XP, Microsoft Vista, Macintosh,
Linux, and Solaris x86. After NetBeans IDE is installed, launch the NetBeans
IDE. There should have been a desktop launcher created during the install pro-
cess. To create your first project, do the following:
1. Launch NetBeans IDE for JavaFX.
2. Start the New Project wizard by choosing File | New Project from the
main menu.
3. In the New Project wizard, select JavaFX Category and JavaFX Script
Application project type.
Figure 1.1 shows what the NetBeans IDE looks like when creating a new
JavaFX Project.
4. In the Name and Location window, type in the Project Name, MyFirst-
JavaFXApplication. Change the location for the project files, if you want,
then press Finish.
Figure 1.2 shows the Name and Location window.
NetBeans IDE then creates the project directory in the specified project folder
and gives it the same name as your project, MyFirstJavaFXApplication. In Fig-
ure 1.3, notice the Main.fx class file below the myfirstjavafxapplication
package in the Source Packages node. This file was created because you left the
 
Search WWH ::




Custom Search