hi all. I want to ch ange my jframe's icon(cup of coffee).
i chkd the forum but that's what i m doing...
here's my code:
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
AppStarter dialog = new AppStarter(new javax.swing.JFrame(), true);
dialog.setLocationRelativeTo(null);
dialog.addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent e) {
System.exit(0);
}
});
[B] dialog.setIconImage(new ImageIcon("untitled.gif").getImage());[/B]
dialog.setTitle("Welcome user.");
dialog.setVisible(true);
}
});
System.out.println("Exit code here");
}
I m using netbeans , jdk 6.
untitled.gif is in the same package where the AppStarter class is.
It doesnt change the image...
Thanks..