This fixes a ClasscastException that we get when hitting enter in an
editable JComboBox:

2006-03-18  Roman Kennke  <[EMAIL PROTECTED]>

        * javax/swing/JComboBox.java
        (actionPerformed): Fetch selected item directly from the editor
        instead of trying to get it from the event.

/Roman

-- 
“Improvement makes straight roads, but the crooked roads, without
Improvement, are roads of Genius.” - William Blake
Index: javax/swing/JComboBox.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JComboBox.java,v
retrieving revision 1.24
diff -u -r1.24 JComboBox.java
--- javax/swing/JComboBox.java	13 Mar 2006 21:33:37 -0000	1.24
+++ javax/swing/JComboBox.java	19 Mar 2006 11:20:55 -0000
@@ -926,7 +926,7 @@
    */
   public void actionPerformed(ActionEvent e)
   {
-    setSelectedItem(((ComboBoxEditor) e.getSource()).getItem());
+    setSelectedItem(getEditor().getItem());
     setPopupVisible(false);
   }
 

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil

Reply via email to