Language change in Java

When you use the ColorChooser objekt in Java, the fields are in english, how do you change the text in eg. the label "Recent" or the text that says "Sample text"? Can it be done in generel for JComponents?
boscAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

lExCommented:
All these values contains UIManager.
"ColorChooser.swatchesRecentText" = "Recent :"
ColorChooser.sampleText" = "Sample Text"

So...
You can change it :
UIManager.put("ColorChooser.swatchesRecentText", "TEST");
0
boscAuthor Commented:
hmm, okay, where can you find the names of the fields, if you want to do it in generel for JComponents? I cant fint it in the api
0
lExCommented:
All available values:

ColorChooser.background          =javax.swing.plaf.ColorUIResource[r=204,g=204,b=204]
ColorChooser.cancelText          =Cancel
ColorChooser.font                =javax.swing.plaf.FontUIResource[family=dialog,name=Dialog,style=plain,size=12]
ColorChooser.foreground          =javax.swing.plaf.ColorUIResource[r=0,g=0,b=0]
ColorChooser.hsbBlueText         =B
ColorChooser.hsbBrightnessText   =B
ColorChooser.hsbGreenText        =G
ColorChooser.hsbHueText          =H
ColorChooser.hsbNameText         =HSB
ColorChooser.hsbRedText          =R
ColorChooser.hsbSaturationText   =S
ColorChooser.okText              =OK
ColorChooser.previewText         =Preview
ColorChooser.resetText           =Reset
ColorChooser.rgbBlueMnemonic     =66
ColorChooser.rgbBlueText         =Blue
ColorChooser.rgbGreenMnemonic    =71
ColorChooser.rgbGreenText        =Green
ColorChooser.rgbNameText         =RGB
ColorChooser.rgbRedMnemonic      =82
ColorChooser.rgbRedText          =Red
ColorChooser.sampleText          =Sample Text  Sample Text
ColorChooser.swatchesDefaultRecentColor      =javax.swing.plaf.ColorUIResource[r=204,g=204,b=204]
ColorChooser.swatchesNameText                =Swatches
ColorChooser.swatchesRecentSwatchSize        =java.awt.Dimension[width=10,height=10]
ColorChooser.swatchesRecentText              =Recent:
ColorChooser.swatchesSwatchSize              =java.awt.Dimension[width=10,height=10]
ColorChooserUI                   =javax.swing.plaf.basic.BasicColorChooserUI


0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

boscAuthor Commented:
Thanks, but where did you find the names of the fields?
0
lExCommented:
0
boscAuthor Commented:
thanks, just what i needed
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.