Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How can I change the title bar color of JOptionPane?

817657Nov 22 2010 — edited Nov 23 2010
I tried to customize JOptionPane, so I already did some of them such as background, font and foreground, and they work! But I can't change background color of title bar of JOptionPane.

I tried the following but those don't seem to work.
UIManager.put("OptionPane.questionDialog.border.background", FORM_WINDOW_BACKGROUND);
UIManager.put("OptionPane.questionDialog.titlePane.background", FORM_WINDOW_BACKGROUND);
UIManager.put("OptionPane.questionDialog.titlePane.foreground", FORM_WINDOW_BACKGROUND);
UIManager.put("OptionPane.questionDialog.titlePane.shadow", FORM_WINDOW_BACKGROUND);

I did also for errorDialog and warningDialog as well.

I may sound little ridiculous. Can I remove titlebar of JOptionPane at all?

PS. I DO NOT wanna use JDialog/JFrame instead.

Thanks in advance
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 21 2010
Added on Nov 22 2010
2 comments
1,238 views