Solved

JDialog -Background color

Posted on 1998-08-01
2
1,088 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
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 “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

758 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now