Configure JavaFX Scene Builder
IntelliJ IDEA allows you to open .fxml files in JavaFX Scene Builder right from the IDE so that you can visually design JavaFX interfaces directly.
![An .fxml file opened in Scene Builder in the IDE An .fxml file opened in Scene Builder in the IDE](https://resources.jetbrains.com/help/img/idea/2024.3/fx-scene-builder.png)
When you open an .fxml file in the editor, there are two tabs underneath the editing area: the Text tab is for developing the markup, and the Scene Builder tab is for editing the file in Scene Builder.
Open an .fxml file in the editor.
Switch to the Scene Builder tab.
If your project doesn't have JavaFX Scene Builder, you will see a notification panel prompting you to install Scene Builder Kit.
Click Download Scene Builder Kit on the panel.
After that you can view .fxml files in Scene Builder right in the IDE by switching to the dedicated tab.
Learn how to use JavaFX Scene Builder from JavaFX Scene Builder: User Guide on the Oracle website.
You can configure the path to Scene Builder in IDE settings. In this case, you will be able to open .fxml files outside the IDE in the Scene Builder application.
Download and install the latest version of Scene Builder.
Press CtrlAlt0S to open settings and then select Languages & Frameworks | JavaFX.
Click
in the Path to SceneBuilder field.
In the dialog that opens, specify the path to the Scene Builder executable file on your computer.
The standard paths are:
WindowsmacOSС:
\Users \Username \AppData \Local \SceneBuilder \SceneBuilder.exe /Applications /SceneBuilder.app The path on Linux depends on your distribution.
Apply the changes and close the dialog.
Press Alt01 or go to View | Tool Windows | Project in the main menu to open the Project tool window.
Right-click an .fxml file you want to open and select Open In SceneBuilder.
The Scene Builder application starts, showing you the contents of the selected file.
Thanks for your feedback!