Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Is there a way to reuse FXMLLoader?

954677Aug 30 2012 — edited Sep 4 2012
I have a TableView with a custom cell factory. The layout of a cell is defined in an FXML file. So, everytime the factory is called a new FXMLLoader is created and the contents of the same FXML file are loaded over and over and over again... Which seems like a potentially big performance hit (if the file is read everytime load is called). I would guess that TableView reuses cells during scrolling (instead of creating new ones) but I'm still curious if there's a way to somehow reuse an FXMLLoader that already loaded a file (it would be awesome to see the source code...). Speaking of the source code, how come it's not available for FXMLLoader?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 2 2012
Added on Aug 30 2012
5 comments
1,448 views