| Author |
MouseDragged doesn't seem to be working
|
john price
Ranch Hand
Joined: Feb 24, 2011
Posts: 495
|
|
I'm trying to learn about mouseDragged. Here is my code:
Output:
I obviously am supposed to get some system.out.println's, and there is no system output. What is wrong?
Thanks,
cc11rocks
|
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” (Mosher's Law of Software Engineering)
“If debugging is the process of removing bugs, then programming must be the process of putting them in.” (Edsger Dijkstra)
|
 |
Darryl Burke
Bartender
Joined: May 03, 2008
Posts: 4164
|
|
|
The only listeners you added are MouseListener and KeyListener. mouseDragged isn't a part of either.
|
luck, db
There are no new questions, but there may be new answers.
|
 |
john price
Ranch Hand
Joined: Feb 24, 2011
Posts: 495
|
|
Thank you very much!
Solution add:
Thanks,
cc11rocks
|
 |
Stephan van Hulst
Bartender
Joined: Sep 20, 2010
Posts: 3047
|
|
It's more difficult to make mistakes like that if you make anonymous listeners, like I advised you before.
In any case, you should never have a JPanel also implement listener classes. It's very poor form.
|
 |
 |
|
|
subject: MouseDragged doesn't seem to be working
|
|
|