|
Duplicate :
|
|
|
Duplicate :
|
|
|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
FULL PRODUCT VERSION :
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Darwin mbp.local 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53 PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64
A DESCRIPTION OF THE PROBLEM :
Every time some dialog is triggered to open from a drop event. The dialog doesn't receive any mouse events.
REGRESSION. Last worked in version 8u51
ADDITIONAL REGRESSION INFORMATION:
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Using the attached example code. Just drop anything into the JFrame. From Finder and some other application.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Expecting to be able to click on the JOptionPane buttons. But it doesn't work.
ACTUAL -
The buttons doesn't get any mouse events.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
package test;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import java.awt.HeadlessException;
import java.awt.dnd.DnDConstants;
import java.awt.dnd.DropTarget;
import java.awt.dnd.DropTargetDragEvent;
import java.awt.dnd.DropTargetDropEvent;
import java.awt.dnd.DropTargetEvent;
import java.awt.dnd.DropTargetListener;
public class MainClass extends JFrame implements DropTargetListener
{
public static void main(String[] args)
{
new MainClass();
}
public MainClass()
throws HeadlessException
{
new DropTarget(this, DnDConstants.ACTION_COPY_OR_MOVE, this);
setSize(320, 256);
setVisible(true);
}
@Override
public void dragEnter(DropTargetDragEvent dtde)
{
dtde.acceptDrag(dtde.getDropAction());
}
@Override
public void dragOver(DropTargetDragEvent dtde)
{
dtde.acceptDrag(dtde.getDropAction());
}
@Override
public void dropActionChanged(DropTargetDragEvent dtde)
{
dtde.acceptDrag(dtde.getDropAction());
}
@Override
public void dragExit(DropTargetEvent dte)
{
}
@Override
public void drop(DropTargetDropEvent dtde)
{
dtde.acceptDrop(dtde.getDropAction());
JOptionPane.showConfirmDialog(this, "message");
dtde.dropComplete(true);
}
}
---------- END SOURCE ----------
|