0

I want to Drag and drop my groupwise email directly to my java panel.I can able to drag and drop my groupwise email after placing it on windows explorer(the mail becomes .eml file).

public synchronized void drop(final DropTargetDropEvent dtde)
{
try
{

Transferable tr = dtde.getTransferable();
DataFlavor[] flavors = tr.getTransferDataFlavors();

}

While i try the above code ,there is no Dataflavors. Plz So give me your suggestion.

1 Answers1

0

You can provide a list of absolute path of .eml files that has been dropped onto the swing component and then your code can get those files from that path for further operation.

You can implement Transferable into your own class that can be used to provide data for a transfer operation and extend TransferHandler class to define your own DataFlavor.

Ashish Pancholi
  • 4,569
  • 13
  • 50
  • 88