Double click is not being caught by OnMouseEvent (JavaFX2)

XMLWordPrintable

    • Type: Bug
    • Resolution: Cannot Reproduce
    • Priority: P4
    • 8
    • Affects Version/s: 7u6
    • Component/s: javafx
    • Environment:

      windows XP, Netbeans 7.2 Java 7

      Double clicks are being captured as single click :(

      In fxml file:

      <Button fx:id="A_button" onMouseClicked="#buttonAClicked">
      In the controller

      private void buttonAClicked(MouseEvent mouseEvent) {
          if (mouseEvent.getButton().equals(MouseButton.PRIMARY)) {
              if (mouseEvent.getClickCount() == 2) {
                  System.out.println("Double clicked A_button");
              }
              if (mouseEvent.getClickCount() == 1) {
                  System.out.println("Single clicked A_button");
              }
          }
      }
      Unfortunately I am finding that double click is not being caught - only single clicks. In the debugger, click count is 1.

            Assignee:
            Ľubomír Nerád (Inactive)
            Reporter:
            Anil Philip (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: