List of usage examples for javafx.scene.input DragEvent DRAG_ENTERED
EventType DRAG_ENTERED
To view the source code for javafx.scene.input DragEvent DRAG_ENTERED.
Click Source Link
From source file:Main.java
@Override public void start(Stage primaryStage) { Group root = new Group(); Scene scene = new Scene(root, 300, 250); TextField textBox = new TextField(); textBox.setPromptText("Write here"); // Register an event handler for a single node and a specific event type scene.addEventHandler(DragEvent.DRAG_ENTERED, new EventHandler<DragEvent>() { public void handle(DragEvent e) { System.out.println("drag enter"); }/* w w w . j ava 2 s . c o m*/ }); root.getChildren().add(textBox); primaryStage.setScene(scene); primaryStage.show(); }