|
|
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
Page 4 of 6
Rather than trying to figure out how the script works, let's see what it's like to build and run it in NetBeans 6.1 with JavaFX.
After replacing Main.fx's skeletal contents (see Figure 9) with Listing 1, compile the source code and run the resulting Java class file by clicking
the toolbar's Run Main Project button (the green triangle button). If all goes well, you should see a window that presents
identical content to that shown in Figure 10.

NetBeans 6.1 includes a variety of samples that primarily demonstrate JavaFX's support for animation, basic geometry, color, images, and mouse interaction. You can even have fun with the somewhat buggy Bounce sample, which presents a simple version of the popular Arkanoid game. If you haven't yet tried out these samples, Figure 11 gives you a glimpse of what's available.
Before you can play with a sample, you'll have to create a new project. Complete the following steps to accomplish this task:
After you click Finish, the sample becomes the new main project. Click the green triangle button to compile and run its code.
To view the sample project's source code, expand its Source Packages hierarchy on the Projects tab of the workspace's Projects/Files/Services
window, and double-click the appropriate .fx filename that's located at the bottom of this hierarchy. A new tab will be created that presents this file's source code.
To find out more about the NetBeans IDE, check out the NetBeans IDE Java Quick Start Tutorial page at NetBeans.org. Additionally, you might want to keep in mind that the File menu contains a Set Main Project menu item that lets you easily choose which of the various open projects is the main project -- clicking the green triangle button (or pressing F6) compiles and runs the main project. Also, you can close the main project by selecting File's Close "project name" menu item, and open any project not already open by selecting File's Open Project menu item. If you want to learn more about working with JavaFX in the NetBeans IDE (such as how to debug a malfunctioning script), first select Help Contents from the Help menu to access the IDE's help system, and then select one of the topics under JavaFX Applications (such as Debugging JavaFX Applications) on the help window's Contents tab.
Project Nile provides an Adobe Illustrator Creative Suite 3 (CS3) plugin that lets UI designers export Illustrator-based visual
elements to FXD files (files based on the JavaFX Data, or FXD, format, and having the .fxd extension), or FX files (JavaFX Script source files, with the .fx extension). It also provides an Adobe Photoshop CS3 plugin for exporting Photoshop-based elements to the same kinds of files.
More from JavaWorld