I am developing an applet locally using WSAD and am having problems getting my images to load in the applet. Not completely sure how the getImage() method in the Applet class works. Here is what I am doing:
backgroundImage = getImage (getDocumentBase(), "/images/test.jpg");
When I run this in a server, it works fine. However, when running the applet locally, backgroundImage is null, and in that case, getDocumentBase() returns the local path of my working directory.
All of this makes sense to me, but why can't I instead say:
backgroundImage = getImage(new URL("
That still returns null when developing locally but again fine in the server world? Thoughts???
Thanks in adavance!!!
backgroundImage = getImage (getDocumentBase(), "/images/test.jpg");
When I run this in a server, it works fine. However, when running the applet locally, backgroundImage is null, and in that case, getDocumentBase() returns the local path of my working directory.
All of this makes sense to me, but why can't I instead say:
backgroundImage = getImage(new URL("
That still returns null when developing locally but again fine in the server world? Thoughts???
Thanks in adavance!!!