Example usage for javafx.scene Scene setOnMouseEntered

List of usage examples for javafx.scene Scene setOnMouseEntered

Introduction

In this page you can find the example usage for javafx.scene Scene setOnMouseEntered.

Prototype

public final void setOnMouseEntered(EventHandler<? super MouseEvent> value) 

Source Link

Usage

From source file:Main.java

@Override
public void start(Stage primaryStage) {
    Group root = new Group();
    Scene scene = new Scene(root, 300, 250);

    path = new Path();
    path.setStrokeWidth(1);/*from w  ww . j av a2s .c om*/
    path.setStroke(Color.BLACK);

    scene.setOnMouseClicked(mouseHandler);
    scene.setOnMouseDragged(mouseHandler);
    scene.setOnMouseEntered(mouseHandler);
    scene.setOnMouseExited(mouseHandler);
    scene.setOnMouseMoved(mouseHandler);
    scene.setOnMousePressed(mouseHandler);
    scene.setOnMouseReleased(mouseHandler);

    root.getChildren().add(path);
    primaryStage.setScene(scene);
    primaryStage.show();
}