
Originally Posted by
Norm
Where Do you have the 3 images and the sound file for the applet?
Well when I tried in netbeans 6.8 and Eclipse also as you know already:
1) Netbeans 6.8 - it was in the src folder (this src folder is inside the SingleLaneBridge folder)
2) Eclipse - I put it in the SingleLaneBridge folder not the src folder
I have tried programs which use images before (i mean java application programs). So far I have developed only java applications not applets. In those application programs the image things work.
SideNote: Someone from another forum suggested to put the same images in all the folders and see if it appears. I did this too but it failed.
------------------------------------------------------------------------------------------------------------------------------
OK SINCE YOU ASKED I NOW I TRIED IN ECLIPSE PUTTING THE IMAGES IN EACH FOLDER AND GUESS WHAT
*****************************IT WORKED*************************************
OK here is what I found:
Mistake:
Code:
redCar = controller.getImage(controller.getDocumentBase(), "/redcar.gif");
Corrected one:
It should be (without the / slash within the double quotes- alternatively you can give the path if you like)
Code:
redCar = controller.getImage(controller.getDocumentBase(), "redcar.gif");
Thank you once again NORM.
Hope this benefits anyone as silly as me (:-)).
Thanks