Hello,
I have a couple of JLabel with DnD functionality.
All works fine, but now I want implement a condition, so that Labels with
the same ID (ID is an object in the Transferable-object), do not accept a
drop on each other.
Only labels with a different ID can accept drops for a label.
Please give me some tips.
Levon
ak - 19 Jan 2004 14:55 GMT
> I have a couple of JLabel with DnD functionality.
> All works fine, but now I want implement a condition, so that Labels with
> the same ID (ID is an object in the Transferable-object), do not accept a
> drop on each other.
> Only labels with a different ID can accept drops for a label.
> Please give me some tips.
I think that you should:
1)supply custom DataFlavor (with label ID embedded)
2)your DropTarget should then check ID DataFlavor and accept or reject
drop according to ID
____________
http://reader.imagero.com the best java image reader.