borland Packages Class Hierarchy dbswing Package
java.lang.Object +----com.borland.dbswing.IntlSwingSupport
Constructors Properties Methods
Implements PropertyChangeListener, Serializable, EventListener
IntlSwingSupport
provides Swing internationalization support for several locales. It automatically updates Swing's internal localizable resources appropriately for the current system locale when instantiated. IntlSwingSupport
needs to be instantiated only once in an application, and should be instantiated on application startup, before any Swing components are displayed. To initialize IntlSwingSupport
for a locale other than the default locale (in a multilingual application, for example), set IntlSwingSupport's
locale
property to the target locale.
IntlSwingSupport intlSupport = new IntlSwingSupport(); //Show a dialog to demonstrate IntlSwingSupport. //User supplies a localized message and title. //IntlSwingSupport translates text that //JOptionPane provides, such as button labels. int response = JOptionPane.showConfirmDialog(frame, localizedMessageString, localizedTitleString, JOptionPane.OK_CANCEL_OPTION);
As of JDK 1.2, the only Swing components with visible, translatable text strings were the JFileChooser
, JColorChooser
, and JOptionPane
.
java.util.Locale
, com.borland.jb.util.ArrayResourceBundle
public IntlSwingSupport()Constructs an
IntlSwingSupport
component for the current system locale. Calls the constructor of this
class that takes a Locale
as a parameter, passing it Locale.getDefault()
.
public IntlSwingSupport(Locale locale)Constructs an
IntlSwingSupport
for the specified locale
.
locale
Locale
being supported.
public Locale getLocale() public void setLocale(Locale locale)Returns and sets the locale being supported.