Bookmark Topic Watch Topic
  • New Topic

Issue while loading images.

 
Bhakta Pradhan
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • 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]
 
Nam Ha Minh
Ranch Hand
Posts: 502
Eclipse IDE Firefox Browser Windows
  • Mark post as helpful
  • send pies
  • 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
  • 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]
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
Rob Spoor
Sheriff
Pie
Posts: 20514
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • 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.
 
    Bookmark Topic Watch Topic
  • New Topic