
01-24-2008, 06:23 AM
|
 |
Moderator
|
|
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 4,606
|
|
Originally Posted by hardwired
If your window is a JFrame, JDialog or JWindow you can try
myFrame.getContentPane().setBackground(yourColor)
Little explanation on this.
You can do this in this way as well.
myFrame.setBackground(yourColor)
In this way, when you run the application, background color flashes and gone. That is because the frame made up of mane components involving. That's why we used a "Content Pane" in the hardwired code.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Has someone helped you? Then you can To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. their helpful post.
Want to make your IDE the best? To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|