aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Changing bgcolor of JOptionPane Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


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

Changing bgcolor of JOptionPane

Jain Neeraj
Ranch Hand

Joined: Aug 09, 2001
Posts: 35
Does anybody has any idea How can i change the background color of a JOptionPane?
Thanks
Sayed Ibrahim Hashimi
Ranch Hand

Joined: May 17, 2001
Posts: 148
Doesn't the setBackground(Color) method work?
If youre talking about one of the dialogs that is displayed by one of the methods:
showXXXDialog(..) that's a different question.


SCJP 1.4<br /><a href="http://www.cise.ufl.edu/~sih" target="_blank" rel="nofollow">www.cise.ufl.edu/~sih</a>
Jain Neeraj
Ranch Hand

Joined: Aug 09, 2001
Posts: 35
yes definitely i'm looking for that, any suggestions, sorry if asked sth differently earlier...
Thanks for the quick reply
Sayed Ibrahim Hashimi
Ranch Hand

Joined: May 17, 2001
Posts: 148
Ok, here is a code snippet:

In your case you want to call
pane.setBackground(Color)
I got this from the Docs for the JOptionPane class so if you want to look at the rest of it you can find it there.
Hope this helps.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Changing bgcolor of JOptionPane