javafx 8 - Calling initialize() method externally in fxml controller rather than automatically -


i have 6 fxml files having 1 controller . need initialize method not on first fxml on 5th fxml file(passwordarray.fxml) customization of buttons. since initialize() method called automatically on load of first fxml file(home.fxml) , shows error. how use initialize method after passwordarray.fxml . searched on internet not found solution of question. should use diffferent controllers , because need initialize method more 1 fxml file.main fxml file (home.fxml)

controller (majorprojectcontroller.java) [initialize() method][3]

you can check file name in url location parameter of initialize method , trigger actions accordingly. note that, fxmlloader create separate instance of controller class each individual fxml - unless provide own manually fxmlloader instance.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -