FileDocCategorySizeDatePackage
LocaleApplet.javaAPI DocExample714Sun Jan 07 17:10:36 GMT 2001None

LocaleApplet

public class LocaleApplet extends Applet

Fields Summary
TextField
LocaleDisplayField
Constructors Summary
Methods Summary
public voidinit()


     
    setLayout(null);
    setSize(250,96);
    add(LocaleDisplayField);
    LocaleDisplayField.setBounds(24,36,205,24);

    // Display the default locale
    System.out.println(Locale.getDefault().getDisplayName());
    LocaleDisplayField.setText(Locale.getDefault().toString());

    // Let's try and reset the locale
    Locale.setDefault(Locale.JAPAN);

    // And now display the new default locale
    System.out.println(Locale.getDefault().toString());
    LocaleDisplayField.setText(Locale.getDefault().toString());