Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger


Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
im trying to set an icon into a label, in an applet, but
it displays this message: access denied ( c:/piledriver.gif read)
i dont know what i should do, could anyone help me?
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi rafa,
Your applet needs the right permissions or it needs to be signed. By default you cannot read a file from local file system (Sandbox).
You can use Applet.getImage(URL url) to get the image from your server.
Or you can put the image in the jar file and get it with
URL url = this.getClass().getResource("icon.gif");
Image image=Applet.getImage(url);
I am going to test your electrical conductivity with this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic