When loading your FXML markup, there is only one condition for having one controller specified for your scene graph. You can download other FXML markup files and socket controllers, but I donβt think you are asking.
In my opinion, it does not matter.
You can write any number of classes in any number of files and associate them with your controller class in the same way that any Java class can interact with any other Java class.
I really can't come up with any particularly good reason why it would be useful to specify several controllers for the scene graph at boot time.
source share