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

Unable to transfer focus with single click when the combobox popup is visible

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Not an Issue
    • Affects Version/s: 6, 6u10
    • Fix Version/s: None
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
    • CPU:
      generic, x86
    • OS:
      generic, windows_2003, windows_xp

      Description

      FULL PRODUCT VERSION :
      java version "1.6.0_10"
      Java(TM) SE Runtime Environment (build 1.6.0_10-b33)
      Java HotSpot(TM) Client VM (build 11.0-b15, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Windows 2003

      A DESCRIPTION OF THE PROBLEM :
      Until JDK 6, Single click on any swing component when combobox popup is visible hides the combobox popup and the focus is transferred to the component on which the mouse was clicked.

      In JDK6 Updated 10, Single click on any component just hides the combobox popup. Another click must be made (once the popup is hidden) to actually transfer the focus.

      Also, this issue is happening only when the Look and Feel is set to WindowsLookAndFeel.




      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Compile and Run the provided source code.
      2. Click the combo box to show the popup containing options.
      3. Now, with the popup being visible, click on the text field.



      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Popup is hidden and the cursor focus goes to the text field.
      ACTUAL -
      Popup is hidden but the focus still remains on the combo box.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import java.awt.FlowLayout;
      import javax.swing.JComboBox;
      import javax.swing.JFrame;
      import javax.swing.JTextField;
      import javax.swing.UIManager;

      public class TestComboBox extends JFrame {

      JComboBox cb = null;
      JTextField tf = null;

      public TestComboBox() {
      super("Test Combo");

      cb = new JComboBox(new String[]{"one","two","three","four"});
      tf = new JTextField();
      tf.setColumns(10);

      this.getContentPane().setLayout(new FlowLayout());
      this.getContentPane().add(cb);
      this.getContentPane().add(tf);

      this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);

      }

      public static void main(String[] args) throws Exception {

      UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());

      TestComboBox tc = new TestComboBox();

      tc.setSize(500,500);
      tc.setVisible(true);
      }
      ---------- END SOURCE ----------

      Release Regression From : 6u6
      The above release value was the last known release where this
      bug was not reproducible. Since then there has been a regression.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alexp Alexander Potochkin (Inactive)
                Reporter:
                ndcosta Nelson Dcosta
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: