Java Swing中JFrame默认提java自带的图标,需要自己更改定义
BufferedImage image = null;
try {
image = ImageIO.read(frame.getClass()
.getResource("./icon.jpg"));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
frame.setIconImage(image);