This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes JOptionPane Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JOptionPane" Watch "JOptionPane" New topic
Author

JOptionPane

Udaya Bascar
Ranch Hand

Joined: Jun 18, 2002
Posts: 32
How i can change the Icon thats displayed on the
JOptionPane
Rene Liebmann
Ranch Hand

Joined: May 02, 2002
Posts: 196
I don't know, which method you use for showing JOptionPane or maybe you use it without one of these static methods? Anyway you can create an Icon or ImageIcon and either you can call the setIcon Method or you can give your icon as a parameter of a static method, e.g.
Udaya Bascar
Ranch Hand

Joined: Jun 18, 2002
Posts: 32
i use this code
for displaying my MessageBox
JOptionPane.showMessageDialog(null,"HALO");
now how can i change the icon
thats displayed in the above JOptionPane
 
wood burning stoves
 
subject: JOptionPane
 
Similar Threads
JDialog
actions performed
java alert
Message Dialog box --> action performed.
[B]How To Center/Position a showMessageDialog box?[/B]