-
Bug
-
Resolution: Fixed
-
P3
-
6u16
-
b07
-
sparc
-
solaris_10
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2186484 | 7 | Andrei Dmitriev | P4 | Resolved | Fixed | b84 |
JDK-2195142 | 6u22 | Vaibhav Choudhary | P3 | Closed | Fixed | b01 |
JDK-2195631 | 6u21-rev | Vaibhav Choudhary | P3 | Closed | Fixed | b08 |
JDK-2185832 | 6u18 | Andrei Dmitriev | P2 | Closed | Won't Fix |
The problem is only that clicking and holding on the JComboBox and dragging to an item outside the bounds of the containing JFrame is not selecting that item that was highlighted when the mouse was released. No other windows/frames/etc. are involved in reproducing the bug.
This problem is on Solaris and CDE/Java Desktop on XWindows, on both the x86 and SPARC
Reproducable test case
For a JComboBox, if you click and hold and then release the mouse button on an item that is significantly outside the bounds of the JFrame that the JComboBox was contained in, it will not select that item and a popup menu cancelled event is fired. If you click the combo box and release, and then click the same item as before, it will select that item correctly. If you click and hold and then release the mouse button on an item that is within the confines of the Jframe that contains the JComboBox, then that item WILL be selected correctly.
This was verified to have worked correctly in Java 5, and appears to be a new problem for Java 6.
Reproducable test case
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
public class ComboBoxBug
{
public static final void main(String[] args) {
JFrame frame = new JFrame("Combo Box Bug");
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
frame.setLayout(new FlowLayout());
final JComboBox comboBox = new JComboBox(new Object[] {"One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine"});
comboBox.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
System.err.println("Action performed!");
}
});
comboBox.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
System.err.println("Item state changed!");
}
});
comboBox.addPopupMenuListener(new PopupMenuListener() {
public void popupMenuCanceled(PopupMenuEvent e) {
System.err.println("Popup menu cancelled!");
}
public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
System.err.println("Popup menu will become invisible!");
}
public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
System.err.println("Popup menu will become visible!");
}
});
frame.getContentPane().add(comboBox);
frame.pack();
frame.setVisible(true);
}
This problem is on Solaris and CDE/Java Desktop on XWindows, on both the x86 and SPARC
Reproducable test case
For a JComboBox, if you click and hold and then release the mouse button on an item that is significantly outside the bounds of the JFrame that the JComboBox was contained in, it will not select that item and a popup menu cancelled event is fired. If you click the combo box and release, and then click the same item as before, it will select that item correctly. If you click and hold and then release the mouse button on an item that is within the confines of the Jframe that contains the JComboBox, then that item WILL be selected correctly.
This was verified to have worked correctly in Java 5, and appears to be a new problem for Java 6.
Reproducable test case
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
public class ComboBoxBug
{
public static final void main(String[] args) {
JFrame frame = new JFrame("Combo Box Bug");
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
frame.setLayout(new FlowLayout());
final JComboBox comboBox = new JComboBox(new Object[] {"One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine"});
comboBox.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
System.err.println("Action performed!");
}
});
comboBox.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
System.err.println("Item state changed!");
}
});
comboBox.addPopupMenuListener(new PopupMenuListener() {
public void popupMenuCanceled(PopupMenuEvent e) {
System.err.println("Popup menu cancelled!");
}
public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
System.err.println("Popup menu will become invisible!");
}
public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
System.err.println("Popup menu will become visible!");
}
});
frame.getContentPane().add(comboBox);
frame.pack();
frame.setVisible(true);
}
- backported by
-
JDK-2186484 JComboBox and dragging to an item outside the bounds of the containing JFrame is not selecting that
- Resolved
-
JDK-2185832 JComboBox and dragging to an item outside the bounds of the containing JFrame is not selecting that
- Closed
-
JDK-2195142 JComboBox and dragging to an item outside the bounds of the containing JFrame is not selecting that
- Closed
-
JDK-2195631 JComboBox and dragging to an item outside the bounds of the containing JFrame is not selecting that
- Closed