O
Ottfried
Following situation:
I designed an own component A inherit from JPanel and implementing
DragSourceListener, DropTargetListener and DragGestureListener. Second
I wrote a class, say ATransferable, implementing Transferable. This
class defines a custom DataFlavor as a public static field, AFLAVOR.
The goal is to transfer data by Drag & Drop from one instance of A to
another instance (in a different VM) of A. Until now it is possible do
DnD A into itself (i.e. into the same instance). This works fine. But
trying to DnD it into another instance the exception
"java.awt.dnd.InvalidDnDOperationException: No drop current" appears
for event.getTransferable().getTransferData(AFLAVOR), where event is
of type DropTargetDropEvent. Despite that
event.getTransferable().getTransferDataFlavors() returns AFLAVOR.
Comparing the former and the latter case, I found out, that in the
latter case event.getTransferable() returns a Transferable, where the
contained field (Transferable) local is null.
What goes wrong? Did I forget anything? Have I create my own
TransferHandler? Can anyone explain what steps I've left out to do?
Thanks!
Ottfried
I designed an own component A inherit from JPanel and implementing
DragSourceListener, DropTargetListener and DragGestureListener. Second
I wrote a class, say ATransferable, implementing Transferable. This
class defines a custom DataFlavor as a public static field, AFLAVOR.
The goal is to transfer data by Drag & Drop from one instance of A to
another instance (in a different VM) of A. Until now it is possible do
DnD A into itself (i.e. into the same instance). This works fine. But
trying to DnD it into another instance the exception
"java.awt.dnd.InvalidDnDOperationException: No drop current" appears
for event.getTransferable().getTransferData(AFLAVOR), where event is
of type DropTargetDropEvent. Despite that
event.getTransferable().getTransferDataFlavors() returns AFLAVOR.
Comparing the former and the latter case, I found out, that in the
latter case event.getTransferable() returns a Transferable, where the
contained field (Transferable) local is null.
What goes wrong? Did I forget anything? Have I create my own
TransferHandler? Can anyone explain what steps I've left out to do?
Thanks!
Ottfried