package bugs;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.input.TransferMode;
import javafx.stage.Stage;

public class JDK8143599_DragANDDrop extends Application {

    @Override
    public void start(final Stage stage) throws Exception {
        stage.show();

        Stage child = new Stage();

        final Button button = new Button();
        button.setCancelButton(true);
        button.setOnAction(event -> child.close());

        final Scene scene = new Scene(button);
        scene.setOnDragOver((drag) -> {
            drag.acceptTransferModes(TransferMode.LINK);
        });
        child.setScene(scene);
        child.showAndWait();
    }

    public static void main(String[] args) {
        launch(args);
    }
}
