I have a problem i have never had before and couldnt find a solution on the web. I have a small Programm which uses some images to print a menu.
This is the Class i
The ".getPath()" part of your code excludes the leading part of the URL.
This needs to be present if your resource is part of a jar file.
I suggest you remove the ".getPath()" and use the full URL.
Printing out the full URL is a good idea too, in a System.out.println for example.
Before all be sure your resource is correctly loaded (for example with a System.out())!
Instead to use ImageIcon(String location)
use ImageIcon(URL location)
constructor because your image is not on hdd, but live compressed as URL in your classpath (something like MyJar.jar!/path/to/image.png"); you have to modify your image loading as
this.getClass().getClassLoader().getResource("MyImage.png");