What method is used to distinguish between single,double and triple mouse clicks ? getButton() getPoint() getClickCount() getX() code example
Example: java mouseevent
public void mouseDragged(MouseEvent e) {
mouseX = e.getX();
mouseY = e.getY();
if (SwingUtilities.isLeftMouseButton(e)) {
mouseB = 1;
}
if (SwingUtilities.isRightMouseButton(e)) {
mouseB = 3;
}
MouseDraggedEvent event = new MouseDraggedEvent(e.getX(), e.getY(), mouseB);
try {
eventListener.onEvent(event);
} catch (Exception ex) {}
}