Glad you got your game functioning. To add to your post, here are two tutorials which are helpful on this subject:
How to Write a Key Listener (The Java™ Tutorials > Creating a GUI With JFC/Swing >...