Index: java/awt/dnd/DropTarget.java =================================================================== RCS file: /cvs/gcc/gcc/libjava/java/awt/dnd/DropTarget.java,v retrieving revision 1.7.20.1 diff -u -r1.7.20.1 DropTarget.java --- java/awt/dnd/DropTarget.java 27 Sep 2004 15:14:28 -0000 1.7.20.1 +++ java/awt/dnd/DropTarget.java 27 Jan 2005 19:13:21 -0000 @@ -211,9 +211,10 @@ public void addDropTargetListener (DropTargetListener dtl) throws TooManyListenersException { - if (dtl != null) - throw new TooManyListenersException (); - + // Sun's JDK does not, despite documentation, throw any sort of + // exception here when you install an additional DropTargetListener. + // So to be compatible, we do the same thing. + dropTargetListener = dtl; } Index: javax/swing/JComponent.java =================================================================== RCS file: /cvs/gcc/gcc/libjava/javax/swing/JComponent.java,v retrieving revision 1.7.2.27 diff -u -r1.7.2.27 JComponent.java --- javax/swing/JComponent.java 25 Jan 2005 07:07:42 -0000 1.7.2.27 +++ javax/swing/JComponent.java 27 Jan 2005 19:13:21 -0000 @@ -1,5 +1,5 @@ /* JComponent.java -- Every component in swing inherits from this class. - Copyright (C) 2002, 2004 Free Software Foundation, Inc. + Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -50,6 +50,7 @@ import java.awt.Insets; import java.awt.Point; import java.awt.Rectangle; +import java.awt.dnd.DropTarget; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.ContainerEvent; @@ -395,6 +396,7 @@ { super(); super.setLayout(new FlowLayout()); + setDropTarget(new DropTarget()); defaultLocale = Locale.getDefault(); debugGraphicsOptions = DebugGraphics.NONE_OPTION; } @@ -870,6 +872,9 @@ */ protected Graphics getComponentGraphics(Graphics g) { + if (debugGraphicsOptions != DebugGraphics.NONE_OPTION) + g = new DebugGraphics(g, this); + Graphics g2 = g.create(); g2.setFont(this.getFont()); g2.setColor(this.getForeground());