jQuery in Action, 3rd edition
The moose likes Swing / AWT / SWT and the fly likes Change color of a LookAndFeel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Change color of a LookAndFeel" Watch "Change color of a LookAndFeel" New topic

Change color of a LookAndFeel

Laurent Sate

Joined: Dec 18, 2001
Posts: 10
I want to change the color of all the text in my frame. For example, i want to have my JLabel in green in place of blue.
How can I do that?
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15302

setForground(Color) will change the text color. setBackgroud(Color) will change the background color.
Happy Coding,
Gregg Bolinger

GenRocket - Experts at Building Test Data
Laurent Sate

Joined: Dec 18, 2001
Posts: 10
Yes but for the all
i have the response:
set foregroundcolor of all of them to what ever color you want!
for other components also, do the same thing.
Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121


Please re-register with a name that follows the Official JavaRanch Username Conventions. Your username needs to be in the format "first name" + space + "last name".


Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Michael Szul
Ranch Hand

Joined: Sep 18, 2001
Posts: 57
If you use themes with the Metal L&F you can change just about anything you want. Even globally.
I agree. Here's the link: http://aspose.com/file-tools
subject: Change color of a LookAndFeel
It's not a secret anymore!