JavaFx:What if I want to do something after initialize(),before the scene show,how can I achieve this?
问题 I want to do something ,after the controller's initialize() method done,but before the scene show.Is there any method will be invoked before the scene show?I want to put some code into the method. FXMLLoader loader = new FXMLLoader(); loader.setLocation(getClass().getResource("sample.fxml")); AnchorPane pane = loader.load(); Scene gameScene = new Scene(pane); //I load a secne above,the I will get the controller,set some properties,then,use the properties to read a file before the secene show.