Java Code Examples for javax.swing.JComponent#setDefaultLocale()
The following examples show how to use
javax.swing.JComponent#setDefaultLocale() .
These examples are extracted from open source projects.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: dragonwell8_jdk File: Test6524757.java License: GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) { Locale reservedLocale = Locale.getDefault(); try { // it affects Swing because it is not initialized Locale.setDefault(Locale.KOREAN); validate(KOREAN, create()); // it does not affect Swing because it is initialized Locale.setDefault(Locale.CANADA); validate(KOREAN, create()); // it definitely should affect Swing JComponent.setDefaultLocale(Locale.FRENCH); validate(FRENCH, create()); } finally { // restore the reserved locale Locale.setDefault(reservedLocale); } }
Example 2
Source Project: TencentKona-8 File: Test6524757.java License: GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) { Locale reservedLocale = Locale.getDefault(); try { // it affects Swing because it is not initialized Locale.setDefault(Locale.KOREAN); validate(KOREAN, create()); // it does not affect Swing because it is initialized Locale.setDefault(Locale.CANADA); validate(KOREAN, create()); // it definitely should affect Swing JComponent.setDefaultLocale(Locale.FRENCH); validate(FRENCH, create()); } finally { // restore the reserved locale Locale.setDefault(reservedLocale); } }
Example 3
Source Project: jdk8u60 File: Test6524757.java License: GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) { Locale reservedLocale = Locale.getDefault(); try { // it affects Swing because it is not initialized Locale.setDefault(Locale.KOREAN); validate(KOREAN, create()); // it does not affect Swing because it is initialized Locale.setDefault(Locale.CANADA); validate(KOREAN, create()); // it definitely should affect Swing JComponent.setDefaultLocale(Locale.FRENCH); validate(FRENCH, create()); } finally { // restore the reserved locale Locale.setDefault(reservedLocale); } }
Example 4
Source Project: openjdk-jdk8u File: Test6524757.java License: GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) { Locale reservedLocale = Locale.getDefault(); try { // it affects Swing because it is not initialized Locale.setDefault(Locale.KOREAN); validate(KOREAN, create()); // it does not affect Swing because it is initialized Locale.setDefault(Locale.CANADA); validate(KOREAN, create()); // it definitely should affect Swing JComponent.setDefaultLocale(Locale.FRENCH); validate(FRENCH, create()); } finally { // restore the reserved locale Locale.setDefault(reservedLocale); } }
Example 5
Source Project: openjdk-jdk8u-backup File: Test6524757.java License: GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) { Locale reservedLocale = Locale.getDefault(); try { // it affects Swing because it is not initialized Locale.setDefault(Locale.KOREAN); validate(KOREAN, create()); // it does not affect Swing because it is initialized Locale.setDefault(Locale.CANADA); validate(KOREAN, create()); // it definitely should affect Swing JComponent.setDefaultLocale(Locale.FRENCH); validate(FRENCH, create()); } finally { // restore the reserved locale Locale.setDefault(reservedLocale); } }
Example 6
Source Project: openjdk-jdk9 File: Test6524757.java License: GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) { Locale reservedLocale = Locale.getDefault(); try { // it affects Swing because it is not initialized Locale.setDefault(Locale.KOREAN); validate(KOREAN, create()); // it does not affect Swing because it is initialized Locale.setDefault(Locale.CANADA); validate(KOREAN, create()); // it definitely should affect Swing JComponent.setDefaultLocale(Locale.FRENCH); validate(FRENCH, create()); } finally { // restore the reserved locale Locale.setDefault(reservedLocale); } }
Example 7
Source Project: jdk8u-jdk File: Test6524757.java License: GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) { Locale reservedLocale = Locale.getDefault(); try { // it affects Swing because it is not initialized Locale.setDefault(Locale.KOREAN); validate(KOREAN, create()); // it does not affect Swing because it is initialized Locale.setDefault(Locale.CANADA); validate(KOREAN, create()); // it definitely should affect Swing JComponent.setDefaultLocale(Locale.FRENCH); validate(FRENCH, create()); } finally { // restore the reserved locale Locale.setDefault(reservedLocale); } }
Example 8
Source Project: hottub File: Test6524757.java License: GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) { Locale reservedLocale = Locale.getDefault(); try { // it affects Swing because it is not initialized Locale.setDefault(Locale.KOREAN); validate(KOREAN, create()); // it does not affect Swing because it is initialized Locale.setDefault(Locale.CANADA); validate(KOREAN, create()); // it definitely should affect Swing JComponent.setDefaultLocale(Locale.FRENCH); validate(FRENCH, create()); } finally { // restore the reserved locale Locale.setDefault(reservedLocale); } }
Example 9
Source Project: openjdk-8-source File: Test6524757.java License: GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) { Locale reservedLocale = Locale.getDefault(); try { // it affects Swing because it is not initialized Locale.setDefault(Locale.KOREAN); validate(KOREAN, create()); // it does not affect Swing because it is initialized Locale.setDefault(Locale.CANADA); validate(KOREAN, create()); // it definitely should affect Swing JComponent.setDefaultLocale(Locale.FRENCH); validate(FRENCH, create()); } finally { // restore the reserved locale Locale.setDefault(reservedLocale); } }
Example 10
Source Project: openjdk-8 File: Test6524757.java License: GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) { Locale reservedLocale = Locale.getDefault(); try { // it affects Swing because it is not initialized Locale.setDefault(Locale.KOREAN); validate(KOREAN, create()); // it does not affect Swing because it is initialized Locale.setDefault(Locale.CANADA); validate(KOREAN, create()); // it definitely should affect Swing JComponent.setDefaultLocale(Locale.FRENCH); validate(FRENCH, create()); } finally { // restore the reserved locale Locale.setDefault(reservedLocale); } }
Example 11
Source Project: jdk8u_jdk File: Test6524757.java License: GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) { Locale reservedLocale = Locale.getDefault(); try { // it affects Swing because it is not initialized Locale.setDefault(Locale.KOREAN); validate(KOREAN, create()); // it does not affect Swing because it is initialized Locale.setDefault(Locale.CANADA); validate(KOREAN, create()); // it definitely should affect Swing JComponent.setDefaultLocale(Locale.FRENCH); validate(FRENCH, create()); } finally { // restore the reserved locale Locale.setDefault(reservedLocale); } }
Example 12
Source Project: jdk8u-jdk File: Test6524757.java License: GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) { Locale reservedLocale = Locale.getDefault(); try { // it affects Swing because it is not initialized Locale.setDefault(Locale.KOREAN); validate(KOREAN, create()); // it does not affect Swing because it is initialized Locale.setDefault(Locale.CANADA); validate(KOREAN, create()); // it definitely should affect Swing JComponent.setDefaultLocale(Locale.FRENCH); validate(FRENCH, create()); } finally { // restore the reserved locale Locale.setDefault(reservedLocale); } }
Example 13
Source Project: jdk8u-dev-jdk File: Test6524757.java License: GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) { Locale reservedLocale = Locale.getDefault(); try { // it affects Swing because it is not initialized Locale.setDefault(Locale.KOREAN); validate(KOREAN, create()); // it does not affect Swing because it is initialized Locale.setDefault(Locale.CANADA); validate(KOREAN, create()); // it definitely should affect Swing JComponent.setDefaultLocale(Locale.FRENCH); validate(FRENCH, create()); } finally { // restore the reserved locale Locale.setDefault(reservedLocale); } }
Example 14
Source Project: collect-earth File: Messages.java License: MIT License | 4 votes |
public static void setLocale(Locale localeUI){ Locale.setDefault( localeUI ); JComponent.setDefaultLocale( localeUI ); RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME); }