Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

A tutorial on setting the JGoodies l&f/theme via command line

843806Oct 16 2007
I had to look at the source to figure this out and I don't think it's documented. As such, this may not work in the future...

I wanted to be able to set the JGoodies Theme from the command line. If don't know what a JGoodies Theme is, it makes your JGoodies L&F go from the default ugly beige colors to other beautiful colors. Setting the L&F from the command line is easy and well documented. You just add this:

-Dswing.defaultlaf=com.jgoodies.looks.windows.WindowsLookAndFeel
-Dswing.defaultlaf=com.jgoodies.looks.plastic.PlasticLookAndFeel
-Dswing.defaultlaf=com.jgoodies.looks.plastic.Plastic3DLookAndFeel
-Dswing.defaultlaf=com.jgoodies.looks.plastic.PlasticXPLookAndFeel

Note that WindowsLookAndFeel doesn't support themes. What is not documented is how to set the theme via the command line. Here's how you do it:
-DPlastic.defaultTheme=ExperienceRoyale

There are many choices besides ExperienceRoyal. Looking at the source, you can also specify these values:
BrownSugar
DarkStar
DesertBlue
DesertBluer
DesertGreen
DesertRed
DesertYellow
ExperienceBlue
ExperienceGreen
ExperienceRoyale
LightGray
Silver
SkyBlue
SkyBluer
SkyGreen
SkyKrupp
SkyPink
SkyRed
SkyYellow

Enjoy :P
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 13 2007
Added on Oct 16 2007
0 comments
301 views