-
Bug
-
Resolution: Fixed
-
P4
-
1.4.0
-
01
-
x86
-
windows_2000
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2051440 | 1.4.1 | Das Das | P4 | Resolved | Fixed | hopper |
Name: wm7046 Date: 02/05/2002
FULL PRODUCT VERSION :
java version "1.4.0-rc"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-rc-b91)
Java HotSpot(TM) Client VM (build 1.4.0-rc-b91, mixed mode)
FULL OPERATING SYSTEM VERSION :
Microsoft Windows 2000 [Version 5.00.2195]
A DESCRIPTION OF THE PROBLEM :
in Java 1.4, if any DnD is enabled and a modal dialog is
shown, the application locks up completely if a drag is
attempted to the app.
There is a possibly-related bug, 4403757, but that does not
mention locking up.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. create an app that has any DnD-enabled component
(example: JTree).
2. show a modal dialog (example:
JOptionPane.showMessageDialog)
3. Drag from the windows desktop over the app.
EXPECTED VERSUS ACTUAL BEHAVIOR :
expect: no drag allowd
actual: no drag allowed, but application completely locks
up. Windows task manager needed to kill it.
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.dnd.*;
public class TestDrag extends JFrame
{
public TestDrag()
{
super("Test of DnD bug");
this.setDefaultCloseOperation(EXIT_ON_CLOSE);
JMenuBar menuBar = new JMenuBar();
JMenu menu = new JMenu("test");
menu.add(new JMenuItem(new AlertAction(this)));
menuBar.add(menu);
this.setJMenuBar(menuBar);
JComponent content = new JTree();
content.setBackground(Color.white);
content.setOpaque(true);
content.setPreferredSize(new Dimension(400,300));
this.getContentPane().add(content);
this.pack();
}
public static void main(String[] args)
{
new TestDrag().show();
}
public static class AlertAction extends AbstractAction
{
private JFrame frame;
public AlertAction(JFrame frame)
{
super("Alert...");
this.frame = frame;
}
public void actionPerformed(ActionEvent e)
{
JOptionPane.showMessageDialog(frame, "Try dragging now.", "Howdy",
JOptionPane.INFORMATION_MESSAGE);
}
}
}
---------- END SOURCE ----------
CUSTOMER WORKAROUND :
none found.
(Review ID: 139032)
======================================================================
- backported by
-
JDK-2051440 JVM completely locks up when dragging to an app that has a modal dialog showing.
-
- Resolved
-
- duplicates
-
JDK-4673572 Windows freeze when an icon moves over a message dialogue
-
- Closed
-
- relates to
-
JDK-4352221 DND still deadlocks in 1.3 when displaying JOptionPane
-
- Resolved
-
-
JDK-4744936 Can not drag and drop between Netscape and Sun Download Manager
-
- Closed
-
-
JDK-4403757 Modal Dialog does not block Drag&Drop events
-
- Closed
-