This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Your code using an ImageIcon is loading folder16.png, the code using getResource is attempting to load folder.png. Is this a typo in the code or in the post?
Where is the folder containing the image relative to your source code?
Joined: Aug 24, 2013
Right now is OK. I use
Problem was that image must be in .class folder, not in .java folder. But happily when compile with Eclipse it is copy from src\ to bin\
I placed in d:\code\junace.git\demo\src\net\sf\junace\demo\folder16.png and getResource call without paths.
Prerequisites to be succeeded
- after placing to src\package directory refresh (F5) project
- if still error, call Project->Clean
- Build and Run
Joined: Aug 07, 2007
Glad to hear it is resolved and thank you for updating the thread with how you solved it.