You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:
have access to post topics
communicate privately with other members (PM)
not see advertisements between posts
have the possibility to earn one of our surprises if you are an active member
access many other special features that will be introduced later.
Applets run in an AppletContext whether provided by the appletviewer or a browser page. If you run an applet from a main method or load the applet into an application there will be no AppletContext and getCodeBase will return null. In this case you can use an alternate/other image loading method. See how to import a picture into an applet for some options.