JDK-6315298 : Swing DnD - Cannot insert into empty tree folder.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2005-08-24
  • Updated: 2017-05-16
  • Resolved: 2005-09-20
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 6
6 b53Fixed
Related Reports
Relates :  
Description
4468566 added much better drop support to Swing components. While building demos for the JavaOne conference, I discovered a severe limitation with DropMode.INSERT in JTrees. If a folder node has no children, or is collapsed, it is impossible to insert an item into it.

In addition, I found a couple other small issues that should be addressed:

- We should support null for the "dropLineColor" and "dropLineShortColor" properties so that developers can use the UIManager to turn off the drop line indication.

- There is a minor bug with painting the drop line at the end of JTrees.

Comments
EVALUATION I've also decided that allowing to drop as a peer to the root is nonsensical and I've removed this option.
25-08-2005

EVALUATION The solution to the main problem is to allow dropping on top of folder nodes in INSERT mode. To fix the null drop line color issue, we'll simply check for null before trying to draw the drop line. The other bug that was mentioned with the drop line at the end of a tree will also be fixed.
24-08-2005