?
Solved

Language change in Java

Posted on 2003-02-25
6
Medium Priority
?
234 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Suggested Courses
Course of the Month14 days, 12 hours left to enroll

771 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