aspose file tools*
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
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JOptionPane" Watch "JOptionPane" New topic
Author

JOptionPane

Rick Rodriguez
Ranch Hand

Joined: Jun 02, 2001
Posts: 44
How do I change the icon for the JOptionPane?
I know how to change the "message icon", i.e. ERROR_MESSAGE, INFORMATION_MESSAGE, etc.
I am curious about how to change the "little cup of coffee" in the upper left hand corner of the JOptionPane box.
Any feedback would be most welcomed. Thanks!
--Rick
Bill Liteplo
Ranch Hand

Joined: Oct 16, 2002
Posts: 88
I'm not sure how you are showing the JOptionPane, but try this.
Rick Rodriguez
Ranch Hand

Joined: Jun 02, 2001
Posts: 44
Actually, I figured out how to make it use my "Frame's" icon. I just utilize the "this" keyword for the first argument:

The "this" keyword solved my problems. Thanks for your help!
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
Moving this to Swing.


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JOptionPane