Getting the right result of mouse click event
- by Jessy
Hello,
I'm curious why I got the "right" BUT "wrong"number of result when I click the mouse.
I supposed to print on the console mouseClicked once everytimes the mouse is clicked. However I got many of them printed out everytimes I clicked the mouse ...sometimes 5 e.g.
mouseClicked
mouseClicked
mouseClicked
mouseClicked
mouseClicked
Instead of just
mouseClicked
Why?
public void mouseClicked(MouseEvent arg0) {
System.out.println("mouseClicked");
}