Connecting Tech Pros Worldwide Help | Site Map

GUI design

Newbie
 
Join Date: Oct 2007
Posts: 12
#1: Nov 27 '07
Hi all friends,
I am designing simple GUI application. How do I change the background color?
I did change the background color in the design mode. When I run the app, I did not see the color I chose. Please help.
Lives Here
 
Join Date: Sep 2006
Posts: 12,070
#2: Nov 28 '07

re: GUI design


Quote:

Originally Posted by hhhhhhhh

Hi all friends,
I am designing simple GUI application. How do I change the background color?
I did change the background color in the design mode. When I run the app, I did not see the color I chose. Please help.

Perhaps you changed some other color (font color perhaps) instead of the background color. Was this a JFrame's background color? Which IDE are you using and how did you change the color?
JoeMac3313's Avatar
Newbie
 
Join Date: Jul 2007
Posts: 16
#3: Nov 28 '07

re: GUI design


Component.setBackground(Color c)

for example

// import needed to use Color
import java.awt.Color



JPanel panel = new JPanel();

panel.setBackground(Color.GREEN);
Newbie
 
Join Date: Oct 2007
Posts: 12
#4: Nov 29 '07

re: GUI design


Thanks,

I use JFrame and NetBeans and I change color from the design mode (Properties windows on the right side)
Reply