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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Issue while loading images.

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Hi,
Please find the below code.Please let me know what changes shall I make to load the images.PFA below the project structure.
pic1.JPG
[Thumbnail for pic1.JPG]
 
Ranch Hand
Posts: 530
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
When using getClass().getResource(), you must put your images under src folder.
 
Bhakta Pradhan
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Hi I moved the images folder into src (PFA).Still images are not getting loaded :-(
pic2.JPG
[Thumbnail for pic2.JPG]
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Is this any different to your other thread,
the thread with a number of suggestions.
 
Bhakta Pradhan
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Hi,
Ya its similar to the last thread.In last thread I was asking about loading images archived in jar file. As per the suggestion I tried the same in simple program without making jar.But it didn't help. So I thought of starting a new thread to resolve first stage of the whole issue.

Please let me know if there is something to be changed in my program.
 
Sheriff
Posts: 22784
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
I already gave you an answer in your other thread, and I'm not going to repeat it. In fact, this thread will be closed since it's the same problem as your other thread. You should UseOneThreadPerQuestion.
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic