Support for JavaFX 2 in IntelliJ IDEA 12.1February 26th, 2013 by Anna Kozlova
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.
Develop with Pleasure!