Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to change background color of JDialog  RSS feed

 
aayushpatel
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello everybody,
i want to chage background color of JDialog and i had tried by using setBackground(Color.Red)..but i am not able to see any changes..Can any body help me to change background color of JDialog..
Thnx in advance.
Aayush
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"aayushpatel" -

Welcome to the JavaRanch! Please adjust your displayed name to meet the JavaRanch Naming Policy. You can change it here.

Try dialog.getContentPane().setBackground( Color.red );

Thanks! and welcome to the JavaRanch!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!