This first problem I see is that the code is not written with the methods an applet requires.
See the tutorial:
Lesson: Java Applets (The Java™ Tutorials > Deployment)