This (as pointed out by a number of people)
ImageIcon SettingsIc = new ImageIcon("bin/images/settings.png");建议您要加载从图像bin/images关闭文件系统。这是从应用程序执行点开始的相对路径。
ImageIcon 如果文件不存在,则不会抱怨。
如果可能的话,最好将资源嵌入Jar文件中(这将使其更易于部署),并使用类似的方法
getClass().getResource("/bin/images/settings.png")来加载图像。如果可能的话,你应该尝试使用ImageIO.read(URL)加载你的图片,它会抛出一个异常,如果资源指向的File/URL不
不存在(或无效)。



