classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] FYI: fix for javax.swing.JMenu


From: Roman Kennke
Subject: [cp-patches] FYI: fix for javax.swing.JMenu
Date: Wed, 20 Apr 2005 16:39:34 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021204

I committed the attached patch, that fixes

https://savannah.gnu.org/bugs/index.php?func=detailitem&item_id=11606

2005-04-20  Roman Kennke  <address@hidden>

       * javax/swing/JMenu.java
       (add): add(Component) now calls PopupMenu.insert(..) instead of
       PopupMenu.add(..). add(..) is not implemented for Component,
       so JComponent.add(..) is called instead, adding the component
       in the wrong place.


/Roman

Index: javax/swing/JMenu.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JMenu.java,v
retrieving revision 1.14
diff -u -r1.14 JMenu.java
--- javax/swing/JMenu.java      28 Jan 2005 12:12:54 -0000      1.14
+++ javax/swing/JMenu.java      20 Apr 2005 14:36:26 -0000
@@ -162,7 +162,8 @@
    */
   public Component add(Component component)
   {
-    return popupMenu.add(component);
+    popupMenu.insert(component, -1);
+    return component;
   }
 
   /**

reply via email to

[Prev in Thread] Current Thread [Next in Thread]