JavaFXComposerGettingStarted

Contents

Requirements

If you are using NetBeans 6.9, JavaFX Composer is integrated into JavaFX support and you can skip the "Installation" section.

If you are using NetBeans 6.8, follow the "Installation" section. In order to use JavaFX Composer you need NetBeans 6.8 running on JDK 1.6.

Installation

JavaFX Composer can be installed only through NetBeans Update Center.

File:gettingstarted-plugins.png

Check JavaFX Composer in the list of available plugins. Please remember that JavaFX Composer requires JDK 1.6 and it won't install if running on JDK 1.5 and earlier!

If you have installed previous version of JavaFX Composer, it should appear under Updates tab instead of Available plugins.

Click Install and go through the rest of installation wizard. After successful installation, JavaFX Composer should appear under Installed plugins. Preview 2 corresponds with version 1.1, Preview 1 has version 1.0.

Basic Layout

First, you have to create a new JavaFX project using File | New Project. There are several predefined projects under JavaFX category. In order to use JavaFX Composer use either JavaFX Desktop Business Application or JavaFX Mobile Business Application

File:gettingstarted-newproject.png

Click Next, type in project name and location and finish the wizard. New project and JavaFX source will open in the JavaFX Composer.

You can see the structure of the application in the navigator windows. Also it is possible to add or remove components using the Navigator windows - just use the context menu (right click) on the individual nodes. Drag'n'drop components in the Navigator window to change their order.

First Application

The white area in the center of the IDE represents visible part of your application (scene). Simply drag components, containers, data sources, etc. from the palette and drop them to the scene.

File:gettingstarted-palette.png

You can further customize properties of the components using Property sheet. Just click on the component in the scene or in the Navigator window and change the property value in directly the Property sheet or use the advanced customizer next to property value.

File:gettingstarted-customizer.png

You can switch between the design and code editor using buttons on the toolbar. Note that the fragments of code with gray background (guarded blocks) are automatically generated and thus can not be edited. This prevents users from losing their code. Click the green triangle to run the project and see the result.

Samples

Once you are done with the simple HelloWorld application, you may try some of the samples projects that we have prepared for you. Simply create a new project but instead of creating an empty project, choose Samples | JavaFX category. Try out the projects with blue icons.

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo