I suggest that you do what Norm has already suggested: read the applet tutorial that he's already linked to, because you're still way off the mark. Don't just make up code. Read the tutorial first...