tags:

views:

14

answers:

1

I have two Jlist in the same class each with DnD drop enable.

The problem is whatever file I DnD from my desktop to the JLists either number of or number 2 will populate ( and appear ) in JList1. Jlist2 accepts the drag and drop but it is like the content is going to Jlist1 automatically.

Any idea on how to solve that ?

A: 

Maybe by cleaning your code ;-)

Take a look at the DropTargetListener you created to enable DnD operations. i think that either it

  • adds elements to list 1 datamodel wherever you drop them
  • is the same instance for list 1 and list 2, but configured to drop in list 1
Riduidel