Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8125506

[MouseEvent] Incorrect events.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P4
    • None
    • 8
    • javafx
    • jfx8.0b59

    Description

      Run this code.

      package bug;

      import javafx.scene.control.Button;
      import javafx.application.Application;
      import javafx.event.Event;
      import javafx.event.EventHandler;
      import javafx.scene.Scene;
      import javafx.scene.control.ColorPicker;
      import javafx.scene.layout.VBox;
      import javafx.stage.Stage;

      /**
       *
       * @author fx
       */
      public class Bug extends Application {
      private static int i=1;
          @Override
          public void start(Stage stage) throws Exception {
              VBox root = new VBox();
              Button cp = new Button();
              cp.setOnMouseMoved(new EventHandler(){

                  @Override
                  public void handle(Event t) {
                      System.out.println("Move" + i++);
                  }
              });
              root.getChildren().add(cp);
              Scene scene = new Scene(root,200,200);
              stage.setScene(scene);
              stage.show();
          }
          public static void main(String[] args) {
              launch(Bug.class,null);
          }
      }

      Then click on button and wait. You will see on console, that there will be MouseMove Event with some period.

      Attachments

        Issue Links

          Activity

            People

              psafrata Pavel Ĺ afrata
              aglushch Andrew Glushchenko (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported: