Null pointer error in thread

What is that applet argument you’re passing to registerMethod()?

You’ve gotta use your class’ reference so it calls back your class’ draw() method!