I'm still in Computer Science 1 in my school, so I don't know many advanced features yet. In the class we viewed an applet where the user can control an image of a game character and move around with the arrow keys. I'd like to make a simple game like this, something along the lines of PacMan. Can anyone help me with the code, or links to the code? I would greatly appreciate it.

Edit: I'd like to say this is not for a grade, it's just something I'm interested in learning.