I have an FXML file that has 150+ nodes in various tabs and title panes, the FXML file has 494 lines. When I use Scene Builder to edit the FXML and make changes the program becomes unresponsive and I have to kill the program with Windows Task Manager.
Does Scene Builder have a limit to the number of nodes or file size? If so, how can I split the FXML file apart into different FXML files but have the FXMLLoader merge them together for my controller?
An FXML file can include another one.
This could be a way to reduce the size of each individual FXML files.
With Scene Builder, you can include an FXML file using File -> Import -> FXML...
Anyway SB does not have any hard coded limit for the number of components in an FXML file.
So I would say that you are facing a bug here, either in SB or in FX.
Would it be possible for you to share your FXML file with us so that we can make some tests ?
As for user886389, I encourage you to file a bug against Scene Builder in http://javafx-jira.kenai.com
and attach your FXML file. Also describe precisely the operating system release you are using.
This will help us a lot to progress on that issue.
I submitted this question in the jira, just in case other people would like to contribute. If I have multiple fxml files that I import into a main fxml file to prevent the jvm memory heap issue and as it was pointed out to use a better pattern. Can I also have a controller per child fxml file to fit into the same pattern? Or would I be stuck with a potentially huge controller for the parent and children fxml files.
I was able to spend some time today getting the <fx:include source="FXML File Name" /> working in addition the included FXML has it's own controller. I'm going to test the include feature with my larger FXML file on Monday. I suspect editing the smaller <fx:include> FXML files will not hang scene builder, however I also think when I edit the mail FXML file I'll still have a problem.