I am a Java newbie working on a space invaders program. When I call my method handleKeys it does not function properly and allow me to control the patrol ship with the left and right arrow keys. Any help would be appreciated.
Your design is based on the AWT package which is old and has been replaced by Swing. Your design should be event driven not polling loops with sleeps. Events in your case would probably be just keyboard events. You can add a KeyListener to your JPanel. You can use Swing's Timer class to call a method to move the various bits of graphics.