Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to attach files to applet?

 
Bill Lee
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I created a java applet and it's using icons .PNG inside my java directory. I know applet can't access clients' files but my applet must load the icon pictures. So, I am having problem because my applet won't load in a webbrowser. Is there a way to "embed" my icons into my applet?
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

You could either keep the image files in the same web directory as the applet and access them through URL objects, or bundle them with the class files in a jar file and access them using getResourceAsStream.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic