FULL PRODUCT VERSION :
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
PS: no freeze till idk8-51, freeze since jdk8-60
ADDITIONAL OS VERSION INFORMATION :
tested on OS X 10.11, 10.10.5, 10.9 --freeze,
tested on OS X 10.8 -- not freeze but flip.
A DESCRIPTION OF THE PROBLEM :
I made simple demo code below for you, compile it, run either inside Eclipse or exported jar, then drag some file on the pane, then it will show a JOptionPane, then freeze....
Freeze on OS X 10.11 El Capitan, 10.10.5, and 10.9. No freeze on 10.8 but flip. no freeze till jdk8-51, freeze since jdk8-60
import java.awt.Dimension;
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;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JTextPane;
public class DropFreezeDemo {
public static JFrame frame = null;
public static void main(String[] args){
frame = new JFrame("Drop Freeze Demo");
JTextPane jtp = new JTextPane();
DnDListener dndListener = new DnDListener();
new DropTarget(jtp, dndListener);
frame.getContentPane().add(jtp);
frame.setPreferredSize(new Dimension(300, 200));
frame.setMinimumSize(new Dimension(300, 200));
frame.pack();
frame.setVisible(true);
}
}
class DnDListener implements DropTargetListener {
@Override
public void drop(DropTargetDropEvent event) {
JOptionPane.showMessageDialog(DropFreezeDemo.frame, "Now freeze!", "DropFreezeMessage", JOptionPane.ERROR_MESSAGE);
}
@Override
public void dragEnter(DropTargetDragEvent event) {}
@Override
public void dragExit(DropTargetEvent event) {}
@Override
public void dragOver(DropTargetDragEvent event) {}
@Override
public void dropActionChanged(DropTargetDragEvent event) {}
}
REGRESSION. Last worked in version 8u66
REPRODUCIBILITY :
This bug can be reproduced always.