File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes setting bg in jDialog Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "setting bg in jDialog" Watch "setting bg in jDialog" New topic
Author

setting bg in jDialog

miguel lisboa
Ranch Hand

Joined: Feb 08, 2004
Posts: 1281
how can i set background color in a jDialog?
my code:

nothing of this works...

TiA


java amateur
Kaydell Leavitt
Ranch Hand

Joined: Nov 18, 2006
Posts: 689

I'm not sure that I understand. The default background color is white isn't it?

I got the following to work in a JFrame:



If something like this doesn't work for you, the only thing that I can think of that I might have done differently is to disable the layout managers:



[ May 19, 2007: Message edited by: Kaydell Leavitt ]
[ May 19, 2007: Message edited by: Kaydell Leavitt ]
miguel lisboa
Ranch Hand

Joined: Feb 08, 2004
Posts: 1281
The default background color is white isn't it?

no
and its not a frame, but a jDialog
(layout is automatic)
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
miguel lisboa
Ranch Hand

Joined: Feb 08, 2004
Posts: 1281
thanks for your help, Craig

while i'm still studying your code, i added
Kaydell Leavitt
Ranch Hand

Joined: Nov 18, 2006
Posts: 689

Are there some key points that you can tell me so that I can get layout managers to work for me?

Kaydell
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: setting bg in jDialog