Although I guess I would need to change the path to the jar's .gif path, huh?
backImage = getImage(getCodeBase(), "Pong.gif");
Only problem is I don't know how to find it. How do II don't use JCreator so I have no idea how to do it there.
find the path of the .gif in the jar?
(substituting your actual jar file name of course), and it should list the jar file contents.
jar tvf MyJar.jar
I use it in my code like this:Probably. I think that getCodeBase returns the URL to the jar file, and if Pong.gif is not at the root of the jar file, the above wouldn't find it. I could be wrong though. You should feel free to add some debugging statements to the code to see if the values look right.Although I guess I would need to change the path to
> backImage = getImage(getCodeBase(), "Pong.gif");
the jar's .gif path, huh?