• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JOptionPane

 
Rick Rodriguez
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure how you are showing the JOptionPane, but try this.
 
Rick Rodriguez
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to Swing.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic