Hi There! There is code for chaning the title Icon of Frame: ImageIconimage = new ImageIcon("hello.gif"); JOptionPane.setIcon(image.getImage()); But i want to change the Title Icon of Joptionpane or Dialog? How can i chane it. pleeez give code for this. Thanks ravi
JDialogs (and I assume JOptionPane, since they are internally using JDialog), use the icon from the frame that is their parent. So you just need to set the icon on the parent frame and then pass the frame into the constructor of the JDialog for the JDialog to use the same icon.
Write once, run anywhere, because there's nowhere to hide! - /. A.C.