//實例化圖標對象
ImageIcon icon = new ImageIcon("1.jpg");
//創建Image的對象
Image image = icon.getImage();
public FrmJTableDemo() {
try {
jbInit();
//設置窗體顯示的小圖標
this.setIconImage(image);
this.setSize(500,450);
this.setLocation(200,180);
this.setDefaultCloseOperation(EXIT_ON_CLOSE);
this.setTitle("信息表");
this.setVisible(true);
} catch (Exception exception) {
exception.printStackTrace();
}
}