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
Post a Comment