You can start by posting the actual code, because your code compiles and runs just fine for me (well, after I dropped the "extends Applet" and changed the init() method into a static main method).
You have one major bug in your code though. You should never use == for comparing Strings; use equals instead: