how to put hover effects in javafx code example
Example: JavaFX mouse over effe
// .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);
}
}