This content has been marked as final. Show 2 replies
There can be quite a few reasons. Please post the full stack trace of the exception. Please also place strategic System.out.println()'s in your methods so we can see what is called when.
The timing of when the page starts loading, is fully loaded, the applet is init()-ed and start()-ed is not very predictable. As DrClap says, what is the evidence that docstream is non-null?