I'm trying to learn event handling and made an example with an fxml button that looked like that:
<Button fx:id="button" onAction="#Handle">
and the following handler method in my controller:
@FXML
private void Handle () {
btn_welcome.setOnMouseClicked((event) -> {
System.out.println("test");
});
So far this works fine. Now I would like to handle the event of entering the button with the mouse. I tried
@FXML
private void Handle () {
btn_welcome.setOnMouseEntered((event) -> {
System.out.println("test");
});
but it doesn't seem to work.