java - Assigning a controller to a .fxml when loading it in an AnchorPane -


my scene made out of several anchorpanes. 1 of these anchorpanes dynamic , let change this:

    public void speelveldbegin(){     try {         speelbord = fxmlloader.load(getclass().getresource("/view/beginview.fxml"));         this.maincontainer.getchildren().setall(speelbord);     } catch (ioexception e) {         e.printstacktrace();     } 

this works well, assign controller in code rather having set in .fxml can give parameters controller instance.

help appreciated.


Comments

Popular posts from this blog

java - BeanIO write annotated class to fixedlength -

Using Java 8 lambdas/transformations to combine and flatten two Maps -

How to connect android app to App engine -