attempt to load public fx:contoller method without "@FXML" annotation leads to
Controller method "handleButtonAction" is not visible to markup.
with "@FXML" - works fine.
sample files:
________________________________________________
<VBox fx:controller="com.foo.MyController"
xmlns:fx="http://javafx.com/fxml">
<children>
<Button text="Click Me!" onAction="#handleButtonAction"/>
</children>
</VBox>
_____________________________________________
package com.foo;
public class MyController {
public void handleButtonAction(ActionEvent event) {
System.out.println("You clicked me!");
}
}
_________________________________________________
Controller method "handleButtonAction" is not visible to markup.
with "@FXML" - works fine.
sample files:
________________________________________________
<VBox fx:controller="com.foo.MyController"
xmlns:fx="http://javafx.com/fxml">
<children>
<Button text="Click Me!" onAction="#handleButtonAction"/>
</children>
</VBox>
_____________________________________________
package com.foo;
public class MyController {
public void handleButtonAction(ActionEvent event) {
System.out.println("You clicked me!");
}
}
_________________________________________________