Hi im building a JavaFX project and am using JavaFX Scene Builder 2. I wanted to link my controller to my fxml file but i can't see the possibility to add a controller to my fxml file in Scene Builder 2. I was wondering if someone could help me out. Thank you.
3 Answers
As you see on the image the controller menu moved on the left , below the Library List.

- 57
- 1
- 2
- 9

- 1,627
- 4
- 19
- 25
-
6This should be the accepted answer because of the screenshot. – Michael Oct 17 '14 at 17:59
-
1this is scene builder from gluon ...use it if you want these tabs.I was also trying hard to find these options later discovered that this is not original oracle scenebuilder.... download it from here http://gluonhq.com/open-source/scene-builder/ – swapyonubuntu Aug 13 '15 at 16:38
-
4I just noticed that the integration of Scene Builder in IntelliJ IDEA is crippled. When I launch the executable externally I see those sections whereas launching it inside IDEA hides the sections and only shows the contents of Library on the left. – Mark Jeronimus Dec 20 '16 at 11:25
I found the controller attributes by accident in SceneBuilder 2. When closing the hierarchy menu on the left side the Controller menu will be visible where I can declare my controller

- 535
- 1
- 4
- 12
Update
This answer is obsolete. The solution is to use Gluon SceneBuilder and set the controller as specified in the screenshot provided in the most upvoted answer to this question.
I HIGHLY recommend using Scene Builder 1.1 until Scene Builder 2 becomes more complete and reliable a few months from now.
When I recently used Scene Builder 2, it was still an unreliable, early access release.
Scene Builder 1.1 has a feature in the right hand code panel where you can set the controller class. Scene Builder 2 does not seem to have this feature. Therefore, if you use SceneBuilder 2, you will need to set the controller class manually as xxlali says. If, as you indicate, Scene Builder 2 early access sometimes removes your manually set controller class from the FXML file, then that would be one more reason to use a stable certified version rather than the immature early access version.

- 150,031
- 14
- 366
- 406