Number: IMF_04 Title: An exception when change focus between two windows Problem Description: IllegalArgumentException happens during focus change operation if preedit string is exist. Recreation at Java 8(The images are from latest java8 code) Operating System: Windows 7 Japanese/Chinese version Test program : JTextAreaTest3.java 1. Compile and run JTextAreaTest3.java program >java JTextAreaTest3 aaa bbb 2. Two JtextArea windows are opened. Move "bbb" window to right side of "aaa" window 3. Move focus to "aaa" window. 4. Select MS-IME in System Input Method. Make it hHiragana"input mode (In Chinese system, change to chinese input mode) 5. Type "a" in JTextArea under MS-IME, IM lookup window appears 6. Move focus to the second window 7. Make MS-IME as "alpha numeric" input mode by pressing "Kanji-mode" key. (In Chinese system, change to English input mode) 8. Move back the focus to the first window 9. Type "b", but Japanese "a" is displayed in preedit area with "b" <== Problem 10. Press Backspace key twice, and press Return key, Japanese "a" is displayed again. (In Chinese system, the chinese word) Patch Description: Some of Windows IMEs share input context. During DBCS input operation, a preedit string is kept in MS-IME and Java also flags as preedit string is exist. When a focus is moved to an other window and a preedit string in MS-IME is canceled or committed, Java does not detect this change and still hold the preedit flag. This wrong flag causes the problem. Fixed code checks preedit string is exist or not at focus back. If preedit string is not exist, composition operation is canceled.