I have multiple Labels. I have an EventHandler<MouseEvent> that launches a method (opens a dialog) when the Label is clicked (setOnMouseClicked).
However, I have also implemented a setOnMousePressed/setOnMouseDragged method using EventHandler to make the Label draggable.
My problem is, when I release the mouse after the drag, the method for mouse clicked is called and the dialog opens. Is there a way to differentiate these two events (i.e. when dragged, don't call click)? Or is the only way to switch to a different component (Button) so I can differentiate between MouseEvent and ActionEvent?