How can I load images without access to an Applet?
posted 13 years ago
Hello, I'm working on an applet with two other people. We have one applet which loads the core, which loads two panels. The two panels contain the GUI. I'm making one of these two. Everything is working fine except for loading graphics. When I make my piece of code a seperate applet, it works fine, using getImage(getDocBase(), "image.gif"); However, when I'm making a panel, I obviously can't use getDocumentBase. Now the question is: is there any other way to get the same output as getDocBase or to load an image from the current directory? note: i'm making this on my windows 2000 computer, so imagetoolkit or whatever it's called won't work since it doesn't allow access to local files. I tried making a function in the main applet that returns the getDocBase, but upon calling it from my panel i get "function cannot be referenced from a static context", even though i didn't declare anything as static in the panel or the applet. Does anyone have an idea how to do this? [ November 27, 2003: Message edited by: FalconNL none ] [ November 27, 2003: Message edited by: FalconNL none ]