I committed the attached patch, that fixes
https://savannah.gnu.org/bugs/index.php?func=detailitem&item_id=11606
2005-04-20 Roman Kennke <[EMAIL PROTECTED]>
* 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;
}
/**
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches