Drag and drop feedback in a JTree with custom TreeCellRenderer (Java, Swing)?

I figured it out, so just in case anybody cares.

I figured it out, so just in case anybody cares: The answer is right here: in javadoc for TreeCellRenderer The TreeCellRenderer is also responsible for rendering the the cell representing the tree's current DnD drop location if it has one. If this renderer cares about rendering the DnD drop location, it should query the tree directly to see if the given row represents the drop location: JTree. DropLocation dropLocation = tree.getDropLocation(); if (dropLocation!

= null && dropLocation.getChildIndex() == -1 && tree. GetRowForPath(dropLocation.getPath()) == row) { // this row represents the current drop location // so render it specially, perhaps with a different color } The code above should be added to getTreeCellRendererComponent() method.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions