IntelliJ Java IDE
The moose likes Swing / AWT / SWT / JFace and the fly likes Change color of a LookAndFeel Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT / JFace
Reply Bookmark "Change color of a LookAndFeel" Watch "Change color of a LookAndFeel" New topic
Author

Change color of a LookAndFeel

Laurent Sate
Greenhorn

Joined: Dec 18, 2001
Posts: 10
Hello,
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
Sheriff

Joined: Jul 11, 2001
Posts: 15040

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


My Blog | DZone Articles
Laurent Sate
Greenhorn

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!
use
UIManager.put("Label.foreground",Color.blue);
for other components also, do the same thing.
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4120

LS,

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".

Thanks,
-Nate


-Nate
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.
 
IntelliJ Java IDE
 
subject: Change color of a LookAndFeel
 
Threads others viewed
Color is bright or dark
help in Textarea as i thought
change progressBar look and feel
Problem in changing forground color of JSlider!!
CSS: combo-box
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture