This chapter describes how to download and install NetBeans IDE, use it to create a new JavaFX FXML project, start Scene Builder from within the IDE, and run Scene Builder sample applications.
Phpstorm Vs Eclipse
NetBeans vs PhpStorm. When assessing the two solutions, reviewers found PhpStorm easier to use and do business with overall. However, reviewers preferred the ease of set up with NetBeans, along with administration. Reviewers felt that PhpStorm meets the needs of their business better than NetBeans. When comparing quality of ongoing product. Ein paar Dinge, die ich bei PHPStorm (von Jetbrains) geil finde:-).
The integration of JavaFX Scene Builder with NetBeans IDE provides optimal development workflow. It is assumed that you have already installed Scene Builder before continuing with the rest of this chapter. Go to the JavaFX Scene Builder Installation Guide
for installation information.
Downloading and Installing NetBeans IDE
Go to http://netbeans.org/downloads
for the latest NetBeans IDE 7.4 download and installation information.
Creating a New JavaFX FXML Project
In NetBeans IDE, you use the New wizard to create a new JavaFX FXML Application, which is a JavaFX project that is based on an FXML layout. After the project is created, you can edit the FXML file using Scene Builder.


From the NetBeans IDE Main menu, select File, and then choose New Project.
In the New Project dialog box, choose the JavaFX category and JavaFX FXML Application project, as shown in Figure 1-1. Click Next.
Figure 1-1 Create New JavaFX FXML Application Project
Description of 'Figure 1-1 Create New JavaFX FXML Application Project'In the New JavaFX Application dialog box, enter the values you would like to use for the project name, project location, and FXML file name. Click Finish to complete the project creation. Figure 1-2 gives an example with sample values.
Figure 1-2 Set the Name and Location of the New JavaFX Application
Description of 'Figure 1-2 Set the Name and Location of the New JavaFX Application'The IDE's Projects window is updated with the new JavaFX application you just created.
Starting Scene Builder from NetBeans IDE
As shown in Figure 1-3, you can either choose Open to edit the FXML file with the Scene Builder tool or choose Edit to edit the FXML file with the Netbeans FXML editor.
Figure 1-3 Open FXML File from NetBeans IDE
Description of 'Figure 1-3 Open FXML File from NetBeans IDE'
When you right-click the node for the FXML file and choose Open, then NetBeans IDE automatically locates the latest installed Scene Builder on your system and the Scene Builder window appears on top of the Netbeans window, as shown in Figure 1-4.
If you want to use a different installation of Scene Builder or if NetBeans cannot locate the installed Scene Builder, use the following steps to set the location of the Scene Builder installation you would like to use with NetBeans IDE.
From the Main menu, select Tools and choose Options.
On the Mac OS platform, select NetBeans and choose Preferences from the Main menu.In the Options window, click Java and then the JavaFX tab.
Specify the location of the Scene Builder installation folder and then click OK.
Figure 1-4 Open FXML File in Scene Builder (Click image to enlarge.)
Description of 'Figure 1-4 Open FXML File in Scene Builder'
To open the FXML file in the NetBeans FXML editor, from the File menu, right-click the file's node and choose Edit. The FXML source file contents are shown in the IDE's source editor window, as shown in Figure 1-5.
Figure 1-5 Open FXML File in NetBeans FXML Editor
Description of 'Figure 1-5 Open FXML File in NetBeans FXML Editor '
Synchronizing With the Controller Source Code
The NetBeans IDE's Make Controller feature allows you to synchronize the modifications you make in the FXML file that is currently opened in Scene Builder and the controller source code opened in NetBeans IDE. To illustrate this feature, do the following:
In Scene Builder, drag a Button control from the Library panel to the Control panel.
In the Code panel, assign a new value for the new button's
fx:id
field and a new method name for theonAction
method.Select File in the main menu and then Save.
In NetBeans IDE 7.4 or later, right click the project node for the FXML file that you just edited and select Edit from the contextual menu.
From the main menu, select Source and then Make Controller.
The @FXML private variable and the new onAction method for the button you just added in Scene Builder are created in the controller source file. Use the Make Controller command if you delete an element in the Control panel or update anfx:id
value or a method name in Scene Builder.
Where to Go From Here
Now that you are familiar with the integration between the Scene Builder tool and NetBeans IDE, look at JavaFX Scene Builder User Guide
to learn more about the available Scene Builder features. Use the steps described in Getting Started with JavaFX Scene Builder
to create a simple issue tracking application.
You can also try the sample applications provided with the Scene Builder release. These samples are Netbeans projects, which means they can be compiled and ran directly after being opened in the NetBeans IDE. You can download the Scene Builder samples from http://www.oracle.com/technetwork/java/javafx/downloads/index.html
. Right-click the project's node in the IDE's Project window and choose Run, as shown in Figure 1-6.
Figure 1-6 Run Scene Builder Sample Application

Description of 'Figure 1-6 Run Scene Builder Sample Application '
Working with projects
How do I open a NetBeans project in PhpStorm?
Use File | New | Project from Existing Sources and select your NetBeans project directory.
When the Import Project wizard opens, select the Create project from existing sources option and then follow the instructions of the wizard.
PhpStorm will add the necessary definition files (the .idea directory) to your project directory. The NetBeans .nbproject directory and build.xml will remain untouched, and you'll be able to use PhpStorm along with NetBeans.
See also, Importing Project from Existing Source Code.
Is there a directory-based project format in PhpStorm?
Yes, there is a .idea directory where project definition XML files are stored. For more information, see Creating and Managing Projects.
The Run button is disabled. How do I run my application?
The Run button is disabled because there are no run configurations in your project.
You can create run configurations yourself: in the main menu, select Run | Edit Configurations |. Click to add a new configuration and choose how you want to run your application.
How can I open several projects in PhpStorm simultaneously?
It's possible to work with multiple projects simultaneously using PhpStorm. To achieve this, you only need to open a project, while another one is already opened, and choose Add to currently opened projects. See Opening Multiple Projects for details.
How do I close a project?
Select File | Close Project. You can also use File | Exit to close all open projects and quit PhpStorm. See also, Opening, reopening, and closing projects.
Where is the Options dialog?
In PhpStorm, the Settings dialog is used for similar purposes. To open this dialog, press Ctrl+Alt+S.

Webstorm Vs Phpstorm
For more information, see Configuring the IDE.
How do I start with VCS integration?
The most popular Version Control Systems including Git, Subversion, Mercurial, Perforce, and more are supported by PhpStorm. VCS integration for your project can be configured in on the Version Control page of the Settings /Preferences dialog. See Version control fore details.
Working with the code editor
Can I use the NetBeans key bindings in PhpStorm?
Yes, you can.
In the Settings/Preferences dialog Ctrl+Alt+S, select Keymap under Appearance and Behavior.
In the right-hand part of the dialog, next to Keymaps, select NetBeans 6.5 from the list.
How does code completion in PhpStorm work?
The code completion suggestion list appears automatically after you type one or two letters. To narrow down this list, use:
Ctrl+Space. The list is reduced to keywords and the names of classes, methods, and fields available in the current context. Note that the list changes when you press Ctrl+Space for the second or third time.
Ctrl+Shift+Space. Only the types appropriate for the current context are shown.
For more information, see Code completion.
Is local history in PhpStorm any different from that in NetBeans?
Local history in PhpStorm, generally, is more detailed. Whatever you do with a directory, file, class, method or field, or a code block is reflected in your local history. The local history also includes VCS operations.
For more information, see Local History.
Are there any special code analysis features in PhpStorm?
PhpStorm can analyze dependencies, data flows and stack traces, find duplicates and evaluate code quality. Just have a look at the options in the Analyze menu.
Can I enable 'mark occurrences' in PhpStorm?
You can. The corresponding option in PhpStorm is called Highlight usages of element at caret. This option is enabled by default.
Netbeans Ide Vs Phpstorm
Just in case:
Open the Settings dialog Ctrl+Alt+S.
In the Editor category, select General.
In the right-hand part of the dialog, under Highlight on Caret Movement, select the Highlight usages of element at caret checkbox.
Click OK.
Using plugins
Can I use NetBeans plugins in PhpStorm?
Unfortunately not. However, a lot of functionality implemented as plugins for NetBeans is available in PhpStorm 'out of the box'. Besides, there's a lot of plugins for PhpStorm, so you can always find an PhpStorm plugin with the functionality similar to that of your favorite NetBeans plugin.
How do I find the plugin that I need?
All the functions related to working with plugins are on the Plugins page of the Settings dialog Ctrl+Alt+S. You can look for, download, install and update the plugins as well as enable and disable them.
For more information, see Plugins and Manage plugins.
How do I install the plugin that I have available on my computer?
Open the Settings dialog Ctrl+Alt+S.
In the left-hand pane, select Plugins.
In the lower part of the Plugins page, click Install plugin from disk.
In the dialog that opens, select the plugin file (normally, a JAR or ZIP).
Click OK.
If asked, restart PhpStorm.
Configuring PHP development environment
What configuration is needed before start?
A lot of PhpStorm features are available without any configuration right after you launch it. Still, to take full advantage of running your PHP application, you need to configure a PHP interpreter and a server.
If you plan to launch the application locally, you need a PHP engine installed and registered in PhpStorm, as well as a Web server installed, configured, and integrated with PhpStorm. You can install these components separately or use an AMP package. For more details about initial environment configuration, refer to Configure PHP development environment.
If you are going to run and debug an application directly on a remote host, the only thing you need is register access to this host in PhpStorm to enable synchronization.
Refer to the QuickStart Guide for more information on getting started.
How do I start with deployment to a remote host?
If you've checked out your project from the remote host, the deployment server is already configured. Otherwise, you will need to get it configured (it can be FTP/SFTP/FTPS server or mounted/local folder) on the Deployment page of the Settings/Preferences dialog. The Remote host tool window is available on the right-hand side of the PhpStorm window, which can be handy for browsing through your remote server and performing various actions.
See Deploy your application for details.
How do I start debugging?
PhpStorm comes with support for both Xdebug and Zend Debugger for debugging and profiling. There is a zero-configuration debugging workflow available, which means that to start debugging you only need to:
Click Start Listening for PHP Debugging Connections on the toolbar of the IDE.
Place a breakpoint in code by clicking in the editor gutter next to the line.
Start debugging in the browser using a plugin or browser bookmarklets.
