-
Type:
Bug
-
Resolution: Cannot Reproduce
-
Priority:
P4
-
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.
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.