Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.


+10 votes

This is for the Minilab. For me, I have to open scene builder separately and open the file from there. Thanks!

asked in CSC305 Fall 2023 by (1 point)
edited by

2 Answers

+5 votes

The first time you select Open in SceneBuilder, an explorer window should open. You must find the executable for Scenebuilder and select it. I believe it is labeled as SceneBuilder.app on MacOS and SceneBuilder.exe on Windows. Once selected, intelliJ should open the fxml file in SceneBuilder.

answered by (2.1k points)
+3 votes

Luke's answer is basically correct, but I will elaborate.

1) If you haven't done so already, you should install SceneBuilder first. https://gluonhq.com/products/scene-builder/
(If possible, take note of what location it installed to on your hard drive)

2) When you first choose "Open with SceneBuilder" by right clicking on an .FXML file from within IntelliJ, it will pop up a dialog asking you to find the SceneBuilder executable.

2a) For Windows users, I think the default location is C:\Users\yourusername\AppData\Local\SceneBuilder\SceneBuilder.exe
(However, perhaps it might also have installed under "C:\Program Files\SceneBuilder..."?)

Note: AppData is a hidden folder, so you'll probably have to type it in if Windows won't let you browse to it, unless you change your folder view settings to always show hidden files)

2b) For Mac users, the default location is: /Applications/SceneBuilder.app (If you try to browse to it, it may browse inside SceneBuilder.app like a folder, instead of letting you select it, so you should just type it in manually yourself.)

2c) For Debian-based Linux users, try /opt/scenebuilder/bin/SceneBuilder.

3) HOWEVER, if you choose the wrong path originally when it asks you to find the SceneBuilder executable file, then you'll get an error whenever you try to choose "Open with Scenebuilder" from within IntelliJ after that.

To solve this, you should:

3a) For Windows and Linux users, go to File -> Settings -> Languages And Frameworks -> JavaFx

3b) For Mac users, go to IntelliJ IDEA -> Preferences -> Languages And Frameworks -> JavaFx

Then change the "Path to Scenebuilder" to the appropriate path.

answered by (508 points)
edited by