Results 1 to 2 of 2
Thread: Stop Action Listener
- 11-25-2012, 03:04 AM #1Member
- Join Date
- Nov 2012
- Rep Power
Stop Action Listener
I'm creating a game using a GUI. I have an action listener set up for when the user clicks the 'up', 'left', 'right', or 'down' Jbuttons. My avatar moves accordingly, but it continues to move after the button is selected. I want the avatar to move once for each click, rather than continue to move after being clicked once.
This is the code to move my avatar, for which ever button is selected.
Thanks for any help
Re: Stop Action Listener
You will probably have to show more code since the cause of your problem is not shown in the code posted. Also consider using a debugger or adding debug statements to your code to help you figure out the state of the program as it's running.
- By mdCollins1 in forum New To JavaReplies: 5Last Post: 03-21-2012, 05:07 AM
- By Kevinw778 in forum AWT / SwingReplies: 2Last Post: 12-11-2011, 11:44 PM
- By eleda in forum New To JavaReplies: 2Last Post: 10-15-2010, 03:24 AM
- By greatmajestics in forum AWT / SwingReplies: 8Last Post: 03-25-2010, 06:39 PM
- By jeffrey in forum New To JavaReplies: 2Last Post: 10-12-2009, 08:51 AM