-
Bug
-
Resolution: Fixed
-
P3
-
7
-
b68
-
x86
-
windows_xp
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8098690 | emb-9 | Semyon Sadetsky | P3 | Resolved | Fixed | team |
FULL PRODUCT 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, sharing)
A DESCRIPTION OF THE PROBLEM :
The popup of the JComboxBox is misplaced if the height of the popup is greater than the height of the screen.
This happens only with the Windows L&F, the position and the size of the popup is fine with the Metal L&F.
REGRESSION. Last worked in version 6u26
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The popup should be resized and repositioned to fit vertically on the screen.
ACTUAL -
The bottom of the popup is aligned on the top of the combobox. Thus only the bottom of the popup is visible. It's not possible to scroll up and select the elements at the top of the list.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
JFrame frame = new JFrame("JComboBox Test");
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
frame.setSize(320, 200);
frame.setLocation(0, 0);
frame.getContentPane().setLayout(new FlowLayout());
JComboBox combobox = new JComboBox(new DefaultComboBoxModel() {
public Object getElementAt(int index) { return "Element " + index; }
public int getSize() { return 100; }
});
combobox.setMaximumRowCount(60);
frame.getContentPane().add(combobox);
frame.setVisible(true);
---------- END SOURCE ----------
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, sharing)
A DESCRIPTION OF THE PROBLEM :
The popup of the JComboxBox is misplaced if the height of the popup is greater than the height of the screen.
This happens only with the Windows L&F, the position and the size of the popup is fine with the Metal L&F.
REGRESSION. Last worked in version 6u26
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The popup should be resized and repositioned to fit vertically on the screen.
ACTUAL -
The bottom of the popup is aligned on the top of the combobox. Thus only the bottom of the popup is visible. It's not possible to scroll up and select the elements at the top of the list.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
JFrame frame = new JFrame("JComboBox Test");
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
frame.setSize(320, 200);
frame.setLocation(0, 0);
frame.getContentPane().setLayout(new FlowLayout());
JComboBox combobox = new JComboBox(new DefaultComboBoxModel() {
public Object getElementAt(int index) { return "Element " + index; }
public int getSize() { return 100; }
});
combobox.setMaximumRowCount(60);
frame.getContentPane().add(combobox);
frame.setVisible(true);
---------- END SOURCE ----------
- backported by
-
JDK-8098690 JComboBox popup mispositioned if its height exceeds the screen height
-
- Resolved
-
- relates to
-
JDK-4518295 JMenu not displayed correctly when number of JMenuItems is huge
-
- Open
-
-
JDK-8129838 [macosx] Regression: NPE in java.awt.Choice
-
- Resolved
-
-
JDK-8130840 [macosx] The Choice List can't work correctly.
-
- Closed
-