Hello everyone. I am a newbie in java and I'm happy to be here.
I have been on java applets and it's been fun but I'm stucked with painting a ladybug image on applet using "getImage ( getCodeBase(), "Images/ladybug.gif") to load the image. It runs but the appletviewer is blank.
My applets are not embedded in the web. I just type the codes in eclipse and click the 'run' button.
I think the problem is that java is not finding the image in the directory I specified. Please where am I supposed to save the ladybug image so that java can find it on my system whenever I supply the path. Thanks for your anticipated help.
Applets work differently inside of an IDE than outside of it. I suggest to create an HTML file with an APPLET tag, and then to run the applet outside of any IDE, either in a browser or suing appletviewer.
Thanks Ulf. The ladybug is now up on the applet. I'm on my way to making it move and fly. Here is what I eventually did. I simply moved the image to the same directory where LadyBug.class is stored and went back to the IDE to run the program. It displayed the image this time without writing an applet tag.
#Programming does it#$
We begin by testing your absorbancy by exposing you to this tiny ad: