Duplicate :
|
|
Duplicate :
|
|
Relates :
|
|
Relates :
|
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.
|