IntelliJ and JavaFX Support

I just tried setting up my first IntelliJ Java FX project. I did a tutorial in which some fxml files are created. A screenshot is displayed from the eclipse window:

enter image description here

I tried to do something similar, but if I go to the "new file", I can not choose the fxml format. Is there any support in IntelliJ for this? I googled around, but I could not find anything. Always mentions that I should try to enable JavaFX support for my project, but it is included.

Any ideas?

Intellij 13.1, Ultimate Edition

+5
source share
1 answer

Right-click the folder in which you want to create a new file (for example, the package ch.makery.address.view), then select from the context menu:

New | File 

Enter the name of the fxml file you want to create (for example, RootLayout.fxml).

You now have an empty fxml file that you can edit manually.

Manually editing fxml is not really recommended, except for minor tweaks. Therefore, install SceneBuilder and you can edit the new fxml in SceneBuilder by right-clicking on the name of the fxml file in the Idea project window and selecting "Open in SceneBuilder".

See also this related question about what is a JavaFX project in Intellij Idea .

+6
source

Source: https://habr.com/ru/post/1204706/


All Articles