Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Change color of a LookAndFeel

 
Laurent Sate
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
setForground(Color) will change the text color. setBackgroud(Color) will change the background color.
------------------
Happy Coding,
Gregg Bolinger
 
Laurent Sate
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Michael Szul
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you use themes with the Metal L&F you can change just about anything you want. Even globally.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic