Computer Science Canada Mouse Motion Listener? |
Author: | [Gandalf] [ Tue Oct 11, 2005 3:39 pm ] | ||
Post subject: | Mouse Motion Listener? | ||
I read the java documentation on a bunch of the 'mouse' classes, but I'm not quite sure how to put it all together. I have tried various things to get the program to use the mouse, and this is the last:
I am fairly sure the problem is addMouseMotionListener, but I can't find or think of an alternative/fix for it. If you want to see the whole program, I can post it later, but this is the only part relating to mouse movement. Once again, thanks for any help. PS. I made Circle.x/y static for testing purposes. |
Author: | wtd [ Tue Oct 11, 2005 5:15 pm ] | ||
Post subject: | |||
|
Author: | rizzix [ Tue Oct 11, 2005 5:47 pm ] | ||
Post subject: | Re: Mouse Motion Listener? | ||
[Gandalf] wrote: I read the java documentation on a bunch of the 'mouse' classes, but I'm not quite sure how to put it all together. I have tried various things to get the program to use the mouse, and this is the last:
I am fairly sure the problem is addMouseMotionListener, but I can't find or think of an alternative/fix for it. If you want to see the whole program, I can post it later, but this is the only part relating to mouse movement. Once again, thanks for any help. PS. I made Circle.x/y static for testing purposes. ehm.. notice that you are adding a mouse listener everytime the paint method is called? just add it once.. in the init method |