Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

Sponsored Links

Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs

Jump into JavaFX, Part 1: JavaFX Preview SDK

Experience JavaFX with NetBeans 6.1 and Project Nile

  • Print
  • Feedback

Page 2 of 6

The installer first presents a welcome screen, shown in Figure 1.

The welcome screen reveals the size of the NetBeans installation.

Figure 1. The welcome screen reveals the size of the NetBeans installation. (Click to enlarge.)

The installer next presents the license agreement screen, as shown in Figure 2 (it's always a good idea to review a license agreement).

You must accept the license agreement to continue with the install.

Figure 2. You must accept the license agreement to continue with the install. (Click to enlarge.)

Figure 3's screen lets you override the default install location and the JDK used by NetBeans -- remember that it must be at least Java SE 6u7!

Select a JDK by specifying its home directory.

Figure 3. Select a JDK by specifying its home directory. (Click to enlarge.)

The summary screen shown in Figure 4 gives you a chance to change your mind regarding the install location before committing to the install.

Begin the install from the summary screen.

Figure 4. Begin the install from the summary screen. (Click to enlarge.)

When installation finishes, the installer gives you a chance to register your copy of NetBeans, as shown in Figure 5.

Uncheck the checkbox if you choose not to register your copy of NetBeans

Figure 5. Uncheck the checkbox if you choose not to register your copy of NetBeans.

Getting Project Nile

Project Nile provides plugin-based tools for converting Adobe Illustrator and Photoshop graphics to a format that JavaFX-based RIAs can access. Just like NetBeans IDE 6.1 with JavaFX, you can download Project Nile from Sun's JavaFX Technology Downloads page. You can also learn about Project Nile's system requirements and study its release notes there.

I installed the Windows version of Project Nile (it's also available for Mac OS X, Intel only) by downloading and running the project_nile-1_0-pre1-windows-i586.exe installer. This program presents screens similar to those shown in Figures 1 through 5, and selects C:\Program Files\Sun\Project Nile as the default install location. We'll explore this location's contents later in this article.

Using NetBeans IDE 6.1 with JavaFX

After installing NetBeans, start up the IDE (double-click its desktop shortcut on a Windows platform) and wait for its workspace to appear. Figure 6 reveals the NetBeans workspace divided into several windows, which this IDE's help system describes -- select Help Contents from the Help menu to access the help system.

The workspace makes it easy to develop JavaFX software.

Figure 6. The workspace makes it easy to develop JavaFX software. (Click to enlarge.)

At this point, there are no JavaFX projects to access, so we'll have to create one. We can either create a skeletal project, or create a project based on one of the JavaFX samples bundled with NetBeans. In either case, select New Project from the File menu (or click the second button from the left on the toolbar). This activates the New Project wizard (see Figure 7).

NetBeans defaults to the JavaFX project category, which lets you only create JavaFX Script applications.

Figure 7. NetBeans defaults to the JavaFX project category, which lets you only create JavaFX Script applications. (Click to enlarge.)

Hello World! A JavaFX script

Because we'll create a skeletal project, make sure that the project category is set to JavaFX before clicking the Next button. In response, the wizard requests the JavaFX project's name and location on its next screen (see Figure 8). When lowercased, this name also serves as the project's default package name (each project is given its own package and directory).

  • Print
  • Feedback

Resources

More from JavaWorld