1// .fmxl
2// <?import javafx.scene.control.Label?>
3// <Label text="MouseOver Effect" fx:id="label"
4// onMouseEntered="#handleMouseEnter" onMouseExited="#handleMouseExit"/>
5public class Controller {
6
7 @FXML
8 private Label label;
9
10 @FXML
11 public void handleMouseEnter() {
12 label.setScaleX(2.0);
13 label.setScaleY(2.0);
14 }
15
16 @FXML
17 public void handleMouseExit() {
18 label.setScaleX(1.0);
19 label.setScaleY(1.0);
20 }
21}