List of usage examples for java.awt Component getLocale
public Locale getLocale()
From source file:Main.java
/** * Returns the locale for the specified component, or a default one if the component * is not yet part of a container hierarchy. *///from w w w.j av a 2 s . co m public static Locale getLocale(final Component component) { if (component != null) try { return component.getLocale(); } catch (IllegalComponentStateException ignore) { // Ignore. Will returns de default locale below. } return JComponent.getDefaultLocale(); }