Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

jpg not displaying in applet once on web

Status
Not open for further replies.

pauljt

Technical User
Feb 26, 2003
31
GB
Like a lot of others, I am new to java/applets.

I have written a basic applet which rolls through a number of jpg pics at the click of a mouse.

It works fine when on my pc along with calling html code.
The html, class files and jpg files are all in the same directory.
The jpg files are loaded using:

for....
pic[i -1] = getImage(getCodeBase(),"Pic" + i + ".jpg");

Then displayed using:

g.drawImage(pic[picNum], 0, 0, this)


But when I upload the html, class files and jpg's to my web area (all in same area) - the images are not displayed.

A test applet which painted some basic text worked ok.

Any ideas ?




 
Are you sure the your program match the exact letters of filename Pic1.jpg
Uppercase P, then lowercase i ...
some ftp software make the filename with all uppercase letters.
In win98 and winxp, you have to enable the option to display exact letter of filename
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top