Win a copy of Spring in Action (5th edition) this week in the Spring 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 ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

Icons and a Label  RSS feed

 
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone tell my why my icon isn't showing up? I have the .gif file copied to the main directory, the class directory, and the src directory (just to be safe). I thought that I only needed th .gif in the .class folder (the same directory the program is running from). Anyway, all I see is test with no icons.

thanks!
 
Ranch Hand
Posts: 2120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I cannot see anything wrong in the code. Try with another image file.
 
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
to help figure out what's going on, use the full path to the image (just for testing) and see if that works. that will tell you if it's not finding the image or not. i bet you have it in a place that the vm can't find it. try putting it in the dir you are running from instead of hte place where the classes are.
you should probably put your code and the image in a .jar file - then it is easy to load the image with something like:

brian
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!