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

REGRESSION: blocked mouse input in a special case on win32

XMLWordPrintable

    • b38
    • x86
    • windows_2000
    • Verified

      Name: gm110360 Date: 11/20/2003


      FULL PRODUCT VERSION :
      java version "1.4.2_02"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03)
      Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows 2000 [Version 5.00.2195]

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      Service Pack 4

      A DESCRIPTION OF THE PROBLEM :
      My Application uses modal dialogs with JComboBox on it.
      Mouse inputs are blocked if such a modal dialog is opened for within a modal dialog and the popup of the combo box reaches outside the top dialog.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      * start the test application and use the mouse only (!!no keyboard!!)
      * press button "open dialog 1"
      * press button "open dialog 2"
      * open popup of the combobox
      * select "entry c"
      * close "dialog 2"
      * close "dialog 1"
      * press button "open dialog 1"
      * press button "open dialog 2"
      * open popup of the combobox
      * try to select "entry a"

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      "entry a" can be selected with a mouse click
      ACTUAL -
      the popup is blocked for mouse events

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import java.awt.*;
      import java.awt.event.*;
      import javax.swing.*;
      public class ComboTest extends JFrame {
        public static void main(String[] args) {
          new ComboTest();
        }
        public ComboTest() {
          JButton b = new JButton("open dialog 1");
          b.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
              openDialog1();
            }
          });
          this.getContentPane().add(b);
          this.setSize(new Dimension(200, 150));
          this.setTitle("main frame");
          this.setVisible(true);
        }
        JDialog dlg1 = null, dlg2 = null;
        void openDialog1() {
          if (dlg1 == null) {
            dlg1 = new JDialog(this,true);
            JButton b = new JButton("open dialog 2");
            b.addActionListener(new ActionListener() {
              public void actionPerformed(ActionEvent e) {
                openDialog2();
              }
            });
            dlg1.getContentPane().add(b);
            dlg1.setLocation(10, 10);
            dlg1.setSize(new Dimension(180, 130));
            dlg1.setTitle("dialog 1");
          }
          dlg1.setVisible(true);
        }
        void openDialog2() {
          if (dlg2 == null) {
            dlg2 = new JDialog(this,true);
            JComboBox cb = new JComboBox(new String[] {"entry a", "entry b", "entry c"});
            dlg2.getContentPane().add(cb);
            dlg2.setLocation(20, 20);
            dlg2.setSize(new Dimension(150, 50));
            dlg2.setTitle("dialog 2");
          }
          dlg2.setVisible(true);
        }
      }
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      The blocking does not appear if the popup fits into the dialog.
      If possible use JComboBox.setMaximumRowCount() to shorten the list.

      Release Regression From : 1.3.1_09
      The above release value was the last known release where this
      bug was known to work. Since then there has been a regression.

      (Incident Review ID: 224892)
      ======================================================================

            art Artem Ananiev (Inactive)
            gmanwanisunw Girish Manwani (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: