Where would I need to save a picture on my computer to be able to use it as an icon on a button in a program?
Jump to Post
The general notion is to have following project structure
- top-package name
Then you can call images from resource directory directly like
new ImageIcon(ClassLoader.getSystemResource("daniweb.png"));no need for directory changes (../../../daniweb.png)etc
All 2 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.