Java MouseListener
Posted
by ikurtz
on Stack Overflow
See other posts from Stack Overflow
or by ikurtz
Published on 2010-04-19T15:35:07Z
Indexed on
2010/04/19
15:43 UTC
Read the original article
Hit count: 358
java
|mouselistener
I have a bunch of JLabels and i would like to trap mouse click events. at the moment i am having to use:
public void mouseClicked(MouseEvent arg0) {
}
public void mouseExited(MouseEvent arg0) {
}
public void mouseEntered(MouseEvent arg0) {
}
public void mousePressed(MouseEvent arg0) {
}
public void mouseReleased(MouseEvent arg0) {
System.out.println("Welcome to Java Programming!");
}
I was wondering if there is a tidier way of doing this instead of having a bunch of events I do not wish trap?
© Stack Overflow or respective owner