1) Why code an applet? If it is due to the teacher specifying it, please refer them to Why CS teachers should stop teaching Java applets. 2) Why use AWT? See this answer for many good reasons to abandon AWT using components in favor of Swing. — Andrew Thompson 1 min ago