• Post Reply Bookmark Topic Watch Topic
  • New Topic

Dialog's BacKground color  RSS feed

 
miguel lisboa
Ranch Hand
Posts: 1281
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using this code:

and i'd like to customize the background color of the displayed dialog.
How can i achieve it?
thanks in advance
 
Craig Wood
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I thought this would be easy but have been unable to find any workable way to reset the plaf ColorUIResource code via the UIManager, the usual approach.

I was able to recurse through the component hierarchy of the JDialog and change the background color of each JPanel in it:
 
miguel lisboa
Ranch Hand
Posts: 1281
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried your code and i do get a red dialog but, i also get a gray squared frame which, when clicked, exits my main app.
i'd like to know how to get rid of this last one.
Thanks a lot anyway
EDITED:
the solution i found is:

[ July 05, 2004: Message edited by: miguel lisboa ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!