I used JXLoginPanel for login.
There is "Name","password","login","cancel" on the label or button.
I'm not in english contry,I want to change it to my own description.
How to do it?Thanks...
Depends on what language are you interested in. There are currently English, French, Spanish and Portugese locales available with JXLoginPanel. If you want different language you would have to translate those labels yourself ... if you do so we would be definitively interested in getting more locales in.
Now once you have translation of all terms ready to get it working in your code this is what you would do normally.
a) Your system setting points to correct locales and it will be picked up automatically
b) You change default locales programatically by setting default locale in application context. For example to get locales to switch to french you would call:[code]
c) You want to change locales only for one component and so you call [code]
Unfortunately non of those options (except maybe first one) seems to work properly due to various issues.
I believe this [url=https://swingx.dev.java.net/issues/show_bug.cgi?id=447]bug[/url] touches on why 2 and 3 fail. The resources are loaded and set during static initialization.
True, tho I think current implementation would not work properly with setLocale() even if that static code was moved to the addon ... but maybe I'm wrong. I'll give it try to see how it behaves.
Yeah, it was definitively bit more then what was suggested in #447 but it should work properly now (build #284). All above mentioned cases should work on jdk1.6, first and last will work also on 1.5.
Well, I believe that JComponent.setDefaultLocale defers to b on 1.6, but it has been there since 1.4 so if that works for 1.5 then it's completely solved.
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Participation.
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.