|
UPDATE: This article is no longer current and has been replaced by this article.
| The JavaFX technology enables you to develop rich internet applications (RIA) using the JavaFX programming language. The best way to start developing JavaFX applications is to use an integrated development environment (IDE). The NetBeans IDE 6.1 includes JavaFX support that enables you to develop, debug, and deploy JavaFX applications. It is a full featured development environment that comes bundled with the JavaFX Software Development Kit (SDK) and best practice samples to assist your software development project. |
Contents
Before you install the NetBeans IDE 6.1 with JavaFX, the Java SE 6 Development Kit (JDK) software must be installed on your system. You can download the required version of the JDK for your platform from one of the following sites:
- For Windows. Download Java SE 6 Update 7 or later. If you choose to use the Java SE 6 Update 10 Beta version, both the Java SE Development Kit (JDK) and Java SE Runtime Environment (JRE) must be downloaded and installed. Two separate Download buttons are on the download page for Java SE 6 Update 10 Beta.
Note: The Java SE 6 Update 10 Beta version provides additional features, such as the ability to drag applets. You must update your browser plugins to use the updated version of the JRE if you want to use applets to run JavaFX applications.
- For Mac OS X. Download Java for Mac OS X 10.5 Update 1. Java upgrades for Mac OS X are also available through Apple's Software Update mechanism.
Note: Because the default version of Java used on your platform is not automatically changed after you upgrade to this version, you must set the default version manually. Choose Applications > Utilities > Java and open Java Preferences. In the Java Preferences window, select Java SE 6 as the Java version to use for running applets, drag Java SE 6 to the top of the runtime settings list, and click Save.
For information about system requirements, see the Release Notes for Preview of NetBeans IDE 6.1 With JavaFX.
If you do not have the NetBeans IDE 6.1 installed on your system yet, download and install the NetBeans IDE 6.1 with JavaFX by using the following steps. This is the recommended method. However, if you already have the NetBeans IDE 6.1 installed and choose to keep that installation, use the steps in Adding JavaFX Support to a Previously Installed IDE to add JavaFX support.
- Download and save the installer file for the NetBeans IDE 6.1 with JavaFX.
- For Windows. The default file name is
netbeans-6.1-javafx-windows.exe.
- For Mac OS X. The default file name is
netbeans-6.1-javafx-macosx.dmg.
- After the download completes, double-click the downloaded file to run the installer.
On a Mac OS X platform, double-click the open-box icon that appears after you start the installer.
- Complete the steps in the installer screens, accepting the license agreement, choosing a location in which the files will be installed, and specifying the location of the required version of the JDK to use, if prompted.
- For Windows. The default installation location is
C:\Program Files\NetBeans 6.1
- For Mac OS X. The default installation location is
Macintosh HD/Applications/NetBeans 6.1
In this section, you start the NetBeans IDE 6.1 and run one of the JavaFX samples that is bundled with the JavaFX installation.
- Start the NetBeans IDE.
- For Windows. Choose Start > All Programs > NetBeans > NetBeans IDE 6.1.
- For Mac OS X. Select Applications > NetBeans > NetBeans 6.1.
- On the Start Page of the IDE, click the JavaFX link in the Try a Sample Project section.
The New Project wizard page appears, with Samples > JavaFX selected, as shown in the following image.
Alternatively, you can invoke the wizard by choosing File > New Project and select Samples > JavaFX.
Figure 1. New Project wizard with JavaFX Samples selected
- In the New Project wizard, select the JavaFX Weather Application project and follow the instructions in the wizard to create the project.
- After the sample's project is created, right-click the new WeatherFXApplication project's node in the Projects window and select Run Project from the pop-up menu.
The application appears in a separate window and displays the current conditions in three different locations, as shown in the following image.
Figure 2. WeatherFX Sample Application in IDE
- To work with additional JavaFX samples, expand the Samples > JavaFX > Best Practices from the New Project wizard, expand the folder for the sample category of your choice, and select the project you want to create. Follow the instructions in the wizard to create the project.
These samples can help you to familiarize yourself with JavaFX applications.
- To create a simple JavaFX application of your own and familiarize yourself with the JavaFX support in the IDE, use the Creating a Simple JavaFX Application Using NetBeans IDE tutorial.
Adding JavaFX Support to a Previously Installed IDE
If you have already installed the NetBeans IDE 6.1, but do not have the JavaFX support, use the following steps to install the JavaFX plugins for NetBeans IDE 6.1. However, it is recommended that you install the NetBeans IDE 6.1 with JavaFX support included by using the installer described in the Downloading and Installing the Software section. By doing so, you minimize the steps to get started with your JavaFX application development.
- Modify the
netbeans.conf file for your existing NetBeans IDE 6.1 installation. Ensure that the netbeans_jdkhome property is set to point to the required JDK 6.0 version that is described in the Software and System Requirements section in this document.
- For Windows. The file can be found in the <IDE-install-dir>/etc directory
.
- For Mac OS X. The file can be found by right-clicking Applications > NetBeans > NetBeans 6.1, selecting Show Package Contents in the pop-up menu, and expanding the Contents > Resources> NetBeans > etc folders in the NetBeans 6.1 Finder window.
- Start your existing installation of the NetBeans IDE 6.1.
- From the main menu, choose Tools > Plugins.
- In the Plugins window, click the Settings tab and check the Active checkboxes for Beta Update Center and all the update centers listed.
The other update centers are checked for any updated plugins on which the JavaFX Script plugins might depend.
- Select the Available Plugins tab and click Reload Catalog to obtain the latest list of available plugins.
- In the list of available plugins, locate all the plugins in the JavaFX category.
You can type javafx in the Search text field to help locate these plugins.
- Check the Install checkboxes for the JavaFX plugins found and click Install.
- Click Next.
- Read and accept the terms in the license agreement displayed and click Install.
- After the installation has completed successfully, choose Restart the IDE Now and click Finish.
|
|