| Author |
MouseListener isn't working right
|
john price
Ranch Hand
Joined: Feb 24, 2011
Posts: 495
|
|
What is wrong with my code? The only thing that works (out of the MouseListener and KeyListener) is the MouseListener. Partially. It is printing out the System.out.println line. It is not doing anything else.
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)
|
 |
Jim Hoglund
Ranch Hand
Joined: Jan 09, 2008
Posts: 525
|
|
What happened? Please post the code output.
Jim ...
|
BEE MBA PMP SCJP-6
|
 |
john price
Ranch Hand
Joined: Feb 24, 2011
Posts: 495
|
|
Jim Hoglund wrote:What happened? Please post the code output.
Jim ...
No error message. I just was testing to see if it was working. I just added a System.out.println statement and it ran fine.
|
 |
Jim Hoglund
Ranch Hand
Joined: Jan 09, 2008
Posts: 525
|
|
Please talk more about your problem so we can see that you understand
the code and what it is intended to do. We want to help but please don't
make us guess about your question.
Jim ...
|
 |
Rob Camick
Ranch Hand
Joined: Jun 13, 2009
Posts: 1788
|
|
|
Up and Down don't generate valid characters. You should be use keyPressed() not keyTyped().
|
 |
john price
Ranch Hand
Joined: Feb 24, 2011
Posts: 495
|
|
Rob Camick wrote:Up and Down don't generate valid characters. You should be use keyPressed() not keyTyped().
Just figured that out, thanks. Could you help me with the other problem?
Thanks,
cc11rocks
|
 |
john price
Ranch Hand
Joined: Feb 24, 2011
Posts: 495
|
|
I found out it was working properly. I am sorry for the question.
Thanks and sorry,
cc11rocks
|
 |
 |
|
|
subject: MouseListener isn't working right
|
|
|