'fx:controller="" in .FXML
is it possible to add two controllers (fx:controller="") in one FXML file ?
I could managed to add only one as fx:controller=""
See the code
<BorderPane id="BorderPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="596.0" prefWidth="600.0" xmlns:fx="http://javafx.com/fxml" fx:controller="demoapp.ClientArea">
Solution 1:[1]
If fits in your code, your Undecorator.java could extend from ClientArea.java. So, any method (or FXML method/control) could be used from its parent: ClientArea.java. Using JavaFX SceneBuilder, won't show you the package.ClientArea in the controller selection, but at runtime it will work.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Leonardo |
