JDK-8020371 : [macosx] applets with Drag and Drop fail with IllegalArgumentException
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 8
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: os_x
  • Submitted: 2013-07-11
  • Updated: 2014-10-15
  • Resolved: 2013-07-15
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8
7u40Fixed 8 b100Fixed
Related Reports
Relates :  
Description
Applets which explicitly call component.setDropTarget(new DropTarget()) fail with IllegalArgumentException.

This is a regression of the fix for JDK-8006941.

The proposed testcase:

import javax.swing.*;
import java.awt.dnd.DropTarget;

public class NewTabApplet extends JApplet {

    public void init() {
        JButton b = new JButton("Click me");
        b.setDropTarget(new DropTarget());
        this.add(b);
    }
}

Expected behavior: applet starts and shows the button.
Real behavior: applet fails with IllegalArgumentException
Comments
The issue could be reproducible only in applet mode, so it's hard to create a regression test.
22-08-2013