Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7071248

IME composition window does not disappear when file dialog is closed : Japanese WinXP

XMLWordPrintable

    • b06
    • generic
    • windows
    • Not verified

        SYNOPSIS
        --------
        IME composition window does not disappear when file dialog is closed

        OPERATING SYSTEM
        ----------------
        Windows XP SP3 (Japanese)

        FULL JDK VERSION
        ----------------
        java version "1.7.0"
        Java(TM) SE Runtime Environment (build 1.7.0-b147)
        Java HotSpot(TM) Client VM (build 21.0-b17, mixed mode)

        PROBLEM DESCRIPTION
        -------------------
        Cannot select item on JPopupMenu by mouse on JOptionPane. This situation happens after showing JPopupMenu on base window.

        This seems to be is a regression caused by the fix for CR 7026055.

        REPRODUCTION INSTRUCTIONS
        -------------------------
        This test instruction requires Windows XP SP3 (Japanese)

        1. Compile and run FileDialogTest1
        2. Press "Open FileDialog" button
        3. Move input focus to "File name", type "abc"
        4. Turn on IME, type "ai", then press Space key twice
        5. IME cadidate window is displayed
        6. Press Cancel button on FileDialog
        7. FileDialog is closed, but IME composition and candidate window are
           still displayed (IME related window should not be displayed at this
           time <== PROBLEM)
        8. Press "Open FileDialog" button again
        9. FileDialog is displayed with IME composition and candidate, but
           "abc" is missing (IME composition string should be canceled like
           "abc" <== PROBLEM)


        TESTCASE
        --------
        import java.awt.*;
        import java.awt.event.*;

        public class FileDialogTest1 extends Frame implements ActionListener {
            FileDialogTest1(){
                Button btn = new Button('Open FileDialog');
                add(btn);
                btn.addActionListener(this);
                addWindowListener(new WindowAdapter(){
                                      public void windowClosing(WindowEvent e){
                                          System.exit(0);
                                      }
                                  });
            }

            public void actionPerformed(ActionEvent e){
                FileDialog fd = new FileDialog(this);
                fd.setVisible(true);
            }
            public static void main(String[] args){
                FileDialogTest1 ft = new FileDialogTest1();
                ft.setSize(new Dimension(300,50));
                ft.setVisible(true);
            }
        }

        SUGGESTED FIX from LICENSEE
        ---------------------------
        See Suggested Fix.
        In attached TESTCASE,

        The line:
        Button btn = new Button('Open FileDialog');
        should be changed to:
        Button btn = new Button("Open FileDialog");
        Otherwise, it won't compile.

              bagiras Oleg Pekhovskiy (Inactive)
              dkorbel David Korbel (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: