Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Language change in Java

Posted on 2003-02-25
6
Medium Priority
?
236 Views
Last Modified: 2012-06-21
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?
0
Comment
Question by:bosc
  • 3
  • 3
6 Comments
 

Expert Comment

by:lEx
ID: 8024077
All these values contains UIManager.
"ColorChooser.swatchesRecentText" = "Recent :"
ColorChooser.sampleText" = "Sample Text"

So...
You can change it :
UIManager.put("ColorChooser.swatchesRecentText", "TEST");
0
 

Author Comment

by:bosc
ID: 8026816
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
 

Accepted Solution

by:
lEx earned 225 total points
ID: 8041363
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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:bosc
ID: 8064360
Thanks, but where did you find the names of the fields?
0
 

Expert Comment

by:lEx
ID: 8066331
0
 

Author Comment

by:bosc
ID: 8066469
thanks, just what i needed
0

Featured Post

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses
Course of the Month14 days, 5 hours left to enroll

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question