This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Applets and the fly likes how to attach files to applet? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Applets
Reply Bookmark "how to attach files to applet?" Watch "how to attach files to applet?" New topic
Author

how to attach files to applet?

Bill Lee
Greenhorn

Joined: Nov 25, 2006
Posts: 3
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
Marshal

Joined: Mar 22, 2005
Posts: 35252
    
    7
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.


Android appsImageJ pluginsJava web charts
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: how to attach files to applet?
 
Similar Threads
Multiple file upload using java applet
HELP NEEDED ON APPLET & ICONS: Loading icon files from JAR file
Display File Icon on mac OSx
custom DefaultListCellRenderer only works on one PC
Blinking effect not visible when loading the applet thr' the browser.