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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -