You are here: irt.org | FAQ | Java | Q4027 [ previous next ]
public boolean handleEvent(Event evt) { switch(evt.id) { case Event.MOUSE_DOWN: if(evt.modifiers == evt.CTRL_MASK) { System.out.println("Right button pressed"); } else { if (evt.modifiers == evt.ALT_MASK) { System.out.println("Middle btn pressed"); } else { System.out.println("Left button pressed"); } } return true; } return super.handleEvent(evt); }