Sample IME Applet

This sample is located in \Samples\International\Sampleime.

Description
Using the Sample
Key Project Files
Technologies Demonstrated

Description

This sample shows how to implement a Java-based, level 2 Input Method Editor (IME) using the InputMethodListener and InputMethodCallback interfaces. The sample IME is language-independent and can be used in any localized system where the Microsoft virtual machine (Microsoft VM) is installed.

Using the Sample

You can also run the sample as an application with the following command:

wjview SampleIMETest

To use the sample

The sample IME allows users to input Unicode characters by typing the hexadecimal value of the characters. To use the IME, do the following:

  1. Disable or turn off your Microsoft® Windows® system IME. For example, if you are using a Japanese version of Windows, select the Direct Input mode. If you are using a Chinese version of Windows, turn off the system IME.

  2. Click the Click here to activate Sample IME button, then click inside the TextField or TextArea. The IME composition window appears.

  3. Type in any Unicode value that matches the default font provided on your system, and then press ENTER. For example, if you type 41 and press ENTER, an A appears in the field. In this case, 0x41 (hexadecimal value) is the Unicode representation of the letter A. If you are using a CJK (Chinese, Japanese, and Korean) version of Microsoft® Windows®, you can input CJK characters by typing their Unicode value. For example, if you type 4e00, you should see the Chinese character yi. You can find the table that maps characters to Unicode values in the Unicode Specification 2.0.

  4. Click the U button in the top left corner of the composition window to close the IME.

Here are some additional tips for using the sample IME:

Key Project Files

SampleIME

This class defines the IME.

SampleIMEWindow

This class defines the user interface (composition window) for the IME.

SampleIMETest

This class extends Applet and includes code to run the SampleIME as an applet or a standalone application.

Technologies Demonstrated

Internationalization

© 1999 Microsoft Corporation. All rights reserved. Terms of use.