I'm making a video game that's having trouble registering key releases with a Key Listener. Everyone here at Stack Overflow suggested I should try Key Bindings instead. I started reading up on Key Bindings and didn't understand the use of an Action in using Key Binding. Could someone please give me an example of the writing and use of an Action class in using a Key Binding in a way when an end user presses a key while focused on a JPanel some code gets executed? And how an Action plays a role in that?
Ps. I read through http://docs.oracle.com/javase/tutorial/uiswing/misc/action.html and http://docs.oracle.com/javase/tutorial/uiswing/misc/keybinding.html If you have any other links with explanations and examples that'd be awesome too =)