Applet.getAppletContext() returns null pointer exception
Can anyone tell me why I'm getting a null pointer exception in my JApplet when I try to access the AppletContext?
Exception occurred during event dispatching:
java.lang.NullPointerException
at java.applet.Applet.getAppletContext(Applet.java:141)
The code is as follows:
java.applet.AppletContext ctx = MyApplet.get().getAppletContext();
FYI: MyApplet extends JApplet and has a private instance of itself which it returns with the public get() method. And no, it doesn't return null.
Thanks for your help in advance...

