Which of the following method is used for getting the number of clicks from MouseEvent class clickCount() getClickCount() getCount() None of these 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) {}
}

Tags:

Java Example