Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

click count says 1 on double click!

anilp1Jan 15 2013 — edited Jan 16 2013
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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 13 2013
Added on Jan 15 2013
7 comments
1,198 views