Features

Support for JavaFX 2 in IntelliJ IDEA 12.1

Over the last year we have been asked to add support for JavaFX 2 quite frequently. Today we are pleased to announce the first preview of the JavaFX 2 plugin for IntelliJ IDEA 12.1.

Having Java 7 installed you may create a new demo project based on JavaFX Application template:

On clicking finish you’ll get a template application ready to run:

There is a .fxml file describing sample layout, controller with handler and the main class. This is already sufficient to start an application and see the results.

Probably you would like to change some names. IntelliJ IDEA will help you to do this and will update all usages in .fxml files as well, e.g.

This means also that navigation between controller class, it’s fields and method handlers works.

In order to change the layout completely you will probably need to open SceneBuilder. Just point IntelliJ IDEA to the Scene Builder installation via File | Settings | JavaFX and call Open in SceneBuilder action via Help | Find Action | Open in SceneBuilder on the layout file.

If you need to make a small change IntelliJ IDEA could help you with smart completion of tags, attributes and even constants:

That’s all for today. In the next post we’ll show how can IntelliJ IDEA help you to skin your JavaFX Application with CSS.

Feel free to share your feedback on the discussion forum and report bugs in our issue tracker.

Develop with Pleasure!

Discover more