1public void mouseDragged(MouseEvent e) {
2 mouseX = e.getX();
3 mouseY = e.getY();
4 if (SwingUtilities.isLeftMouseButton(e)) {
5 mouseB = 1;
6 }
7 if (SwingUtilities.isRightMouseButton(e)) {
8 mouseB = 3;
9 }
10
11 MouseDraggedEvent event = new MouseDraggedEvent(e.getX(), e.getY(), mouseB);
12 try {
13 eventListener.onEvent(event);
14 } catch (Exception ex) {}
15}
16