The same thing happens with ListView or ComboBox. But I think in the FXML file you define controls and you define a generic ListView or ComboBox or TableView or something else. No matter what they are going to show.
So, for me, it makes more sense to set the generic type in the JavaFX controller class, rather than in the FXML file.
Hope this helps.
source
share