I want invoke view method in controller but I don\'t know how :) I sought like example, but I don\'t found it. Can I do that in this code ? whether I must build it anew ? I
put this code in FXMLExampleMVC.java
private static FXMLExampleMVC instance;
public FXMLExampleMVC() {
instance = this;
}
// static method to get instance of view
public static FXMLExampleMVC getInstance() {
return instance;
}
and now you can call your view methods in controller like this
@FXML protected void handleSubmitButtonRegister() throws IOException{
//
//Here I want to invoke gotoRegister
FXMLExampleMVC.getInstance().gotoRegister();
}