IntelliJ IDEA 2024.2 Help

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

Open files in Scene Builder in the IDE

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.

  1. Open an .fxml file in the editor.

  2. Switch to the Scene Builder tab.

    Text and Scene Builder tabs in editor
  3. 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.

    Download Scene Builder Kit

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.

Open files in the Scene Builder application

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.

Configure the path to Scene Builder

  1. Download and install the latest version of Scene Builder.

  2. Press Ctrl+Alt+S to open settings and then select Languages & Frameworks | JavaFX.

  3. Click the Browse button in the Path to SceneBuilder field.

  4. In the dialog that opens, specify the path to the Scene Builder executable file on your computer.

    The standard paths are:

    С:\Users\Username\AppData\Local\SceneBuilder\SceneBuilder.exe

    /Applications/SceneBuilder.app

    The path on Linux depends on your distribution.

  5. Apply the changes and close the dialog.

    Specifying path to SceneBuilder

Launch Scene Builder from the IDE

  1. Press Alt+1 or go to View | Tool Windows | Project in the main menu to open the Project tool window.

  2. 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.

Last modified: 24 September 2024