This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Perceived Behaviour: DnD of nodes doesn't work in modal dialogs. I've got a panel with a BeanTreeView and DnD enabled Nodes. DnD works when I put it in a TopComponent or a non-modal dialog. It silently fails when in a modal dialog. Expected behaviour: DnD should work in modal dialogs. Workaround: None Usecase: My usecase is a custom PropertyEditor which uses an explorerview and node reordering for setting the property. Bug Analyis: DnD in modal Dialogs was removed in 2002: http://netbeans.org/bugzilla/show_bug.cgi?id=22618 The reason was a bug in JDK 1.4.0: "DnD in modal dialogs freezes the JVM in JDK 1.4.0. We detect the situation, log it and don't allow DnD. This is a bug in JDK which has been fixed for 1.4.1." http://netbeans.org/bugzilla/show_bug.cgi?id=25848 Since the bug has been fixed and NB requires at least JDK 1.6, could you replace these lines from ExplorerDragSupport, which prevent using DnD in modal dialogs: Dialog d = (Dialog) SwingUtilities.getAncestorOfClass(Dialog.class, comp); if ((d != null) && d.isModal()) { exDnD.setDnDActive(false); return; } else { exDnD.setDnDActive(true); dge.startDrag(null, transferable, this); } with something like: exDnD.setDnDActive(true); dge.startDrag(null, transferable, this);
core-main f72a1fe1bd6d
Integrated into 'main-golden', will be available in build *201207241500* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/f72a1fe1bd6d User: S. Aubrecht <saubrecht@netbeans.org> Log: #215743 - Allow Drag & Drop for modal Dialogs