|
-
May 26th, 2006, 12:13 AM
#1
Thread Starter
Lively Member
java app
Hi all,
I am using NetBeans IDE, try to develop a simple java application. In the JFrame's properties, I tried to set the background to a diffrent color. It doesn't allow me to do so. It always goes back to the default color which is gray.
Can anyone help me on this.
Thanks in advance.
-
May 26th, 2006, 03:18 AM
#2
Re: java app
Sometimes NetBeans does crazy things, copy the part of the code that changes the color and paste it at the end of the initComponents(), this might make it work
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
-
May 26th, 2006, 05:11 AM
#3
Frenzied Member
Re: java app
How are you setting the background?
It should work when you do:
getContentPane().setBackground(Color.blue);
-
May 26th, 2006, 02:10 PM
#4
Thread Starter
Lively Member
Re: java app
I set the color in the JFrame's properties.
-
May 27th, 2006, 08:09 AM
#5
Frenzied Member
Re: java app
 Originally Posted by AlnavPlatinum
I set the color in the JFrame's properties.
Okay, did you try this;
getContentPane().setBackground(Color.blue);
-
May 27th, 2006, 08:33 AM
#6
Re: java app
 Originally Posted by System_Error
Okay, did you try this;
getContentPane().setBackground(Color.blue);
it's useless, he only want to do it using netbeans frame properties
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
-
May 27th, 2006, 08:45 AM
#7
Frenzied Member
Re: java app
 Originally Posted by ComputerJy
it's useless, he only want to do it using netbeans frame properties
Oh well, it's his loss I guess
-
May 27th, 2006, 10:32 AM
#8
Thread Starter
Lively Member
Re: java app
Yes I did, and it works really well. Thanks for the help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|