$ 0 0 Try using mousePressed() (the function) instead of mousePressed (the boolean), with a global boolean indicating the event happened.