Solved

JDialog -Background color

Posted on 1998-08-01
2
1,143 Views
Last Modified: 2006-11-17
I couldnt see the backgournd color of Jdialog box changing even after setting the background color
for Jdialog box?
0
Comment
Question by:geostp
2 Comments
 
LVL 4

Expert Comment

by:evijay
ID: 1230054
set the background color for the content pane of JDialog. not the JDialog itself.

JComponent cmp = JDialog.getContentPane();

for cmp, set the background color.

0
 
LVL 3

Accepted Solution

by:
mjenkins earned 10 total points
ID: 1230055
Don't forget to setOpaque(true) in order to force the background to be painted.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
jboss 7.1 start up error 1 28
Problem to Alipay 10 41
Is Applet the way to go for my drag and drop system? 8 25
learn programming 8 30
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question