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

[MouseEvent] Incorrect events.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 8
    • Fix Version/s: None
    • Component/s: javafx
    • Labels:
    • Environment:

      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

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

                Dates

                Created:
                Updated:
                Resolved:
                Imported: