2

I am creating a Drag and Drog client using java, but keep on running in with the following exception.

java.awt.dnd.InvalidDnDOperationException: No drop current

This is the code which generates the error

list = (List<File>) (info.getTransferable().getTransferData(DataFlavor.javaFileListFlavor));

And the info object is declared as follows

TransferHandler.TransferSupport info;

Any suggestions on what I can do to solve it.

user1386101
  • 1,945
  • 1
  • 14
  • 21
  • 1
    Where are you trying to read the transfer data from? The data may not be available until it is actually dropped – MadProgrammer Jul 12 '13 at 06:20
  • Also see [this](http://stackoverflow.com/questions/17359566/how-to-drag-an-image-from-one-panel-to-other/17359895#17359895) answer and its [variation](http://stackoverflow.com/questions/17297481/enable-stringflavor-of-transfersupport-in-java-swing/17299098#17299098) for some examples. – David Kroukamp Jul 12 '13 at 10:05
  • So I am dragging a file from a directory into the application window. – user1386101 Jul 12 '13 at 22:23
  • possible duplicate of [Why am I getting an InvalidDnDOperationException?](http://stackoverflow.com/questions/25879171/why-am-i-getting-an-invaliddndoperationexception) – maszter Oct 03 '14 at 14:52

0 Answers0