What errors are you seeing? Without knowing what your errors are, we can't really help you.

I see no code here that shows you're using an applet. This is an application.