This (as pointed out by a number of people)
ImageIcon SettingsIc = new ImageIcon("bin/images/settings.png");
Suggests that you are trying to load the images from the bin/images
off the file systems. This is a relative path from the execution point of your application.
ImageIcon
won't complain if the file does not exist.
If possible, you are better off embedding the resources within your Jar file (it will make it easier to deploy) and use something like getClass().getResource("/bin/images/settings.png")
to load the images.
If possible, you should try using ImageIO.read(URL)
to load your images, it will throw an exception if the resource pointed to by the File
/URL
does not exist (or is invalid).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…