[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] fix JComboBox crash
From: |
Thomas Fitzsimmons |
Subject: |
[cp-patches] fix JComboBox crash |
Date: |
Fri, 09 Sep 2005 00:37:04 -0400 |
Hi,
For some reason BasicComboBoxUI's focus listener was hiding the popup
window when it lost focus. This produced a double-hide on the popup
window, causing strange behaviour. Every third single-click on the
JComboBox's text field would cause the drop-down window to be shown then
immediately hidden.
Exceptions like this were occurring sporadically before:
Exception during event dispatch:
java.awt.IllegalComponentStateException: component
javax.swing.JPopupMenu$HeavyWeightPopup not showing
at java.awt.Component.getLocationOnScreen (Component.java:1190)
at gnu.java.awt.AWTUtilities.convertPointToScreen (AWTUtilities.java:538)
at gnu.java.awt.AWTUtilities.convertPoint (AWTUtilities.java:596)
at java.awt.LightweightDispatcher.acquireComponentForMouseEvent
(Container.java:2046)
at java.awt.LightweightDispatcher.handleEvent (Container.java:2158)
at java.awt.Container.dispatchEventImpl (Container.java:1630)
at java.awt.Window.dispatchEventImpl (Window.java:628)
at java.awt.Component.dispatchEvent (Component.java:2343)
at java.awt.EventQueue.dispatchEvent (EventQueue.java:475)
at java.awt.EventDispatchThread.run (EventDispatchThread.java:75)
Now one is thrown each time an item is selected from the drop-down. I filed a
new report:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23792
Tom
2005-09-09 Thomas Fitzsimmons <address@hidden>
PR swing/23558
* javax/swing/plaf/basic/BasicComboBoxUI.java
(FocusHandler.focusLost): Do not call popup.hide.
Index: javax/swing/plaf/basic/BasicComboBoxUI.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicComboBoxUI.java,v
retrieving revision 1.9
diff -u -r1.9 BasicComboBoxUI.java
--- javax/swing/plaf/basic/BasicComboBoxUI.java 2 Jul 2005 20:32:50 -0000
1.9
+++ javax/swing/plaf/basic/BasicComboBoxUI.java 9 Sep 2005 04:15:51 -0000
@@ -1022,7 +1022,6 @@
{
hasFocus = false;
comboBox.repaint();
- popup.hide();
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cp-patches] fix JComboBox crash,
Thomas Fitzsimmons <=