Getting the right result of mouse click event
Posted
by Jessy
on Stack Overflow
See other posts from Stack Overflow
or by Jessy
Published on 2010-04-06T13:05:33Z
Indexed on
2010/04/06
13:13 UTC
Read the original article
Hit count: 225
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");
}
© Stack Overflow or respective owner