Check out example codes for "JavaFX mouse over effe". It will help you in understanding the concepts better.

Code Example 1

// .fmxl
// <?import javafx.scene.control.Label?>
// <Label text="MouseOver Effect" fx:id="label" 
//		onMouseEntered="#handleMouseEnter" onMouseExited="#handleMouseExit"/>
public class Controller {
  
	@FXML
    private Label label;

    @FXML
    public void handleMouseEnter() {
        label.setScaleX(2.0);
        label.setScaleY(2.0);
    }

    @FXML
    public void handleMouseExit() {
        label.setScaleX(1.0);
        label.setScaleY(1.0);
    }
}

Learn ReactJs, React Native from akashmittal.com