0

In a drop event (DropTargetDropEvent) in Java Swing which files,emails and others can be drop into a drop target, I would like to know if the drop object is an email from outlook. In the code below both file and email can enter the "if" condition.

public void drop(java.awt.dnd.DropTargetDropEvent dropEvt )
{   
    Transferable transferable = dropEvt.getTransferable();
    if(transferable.isDataFlavorSupported(DataFlavor.javaFileListFlavor))
    {
        //Dropped files or email from Outlook enters this condition
    }
} 

Thanks!

mKorbel
  • 109,525
  • 20
  • 134
  • 319
chichi
  • 1
  • 2

1 Answers1

0

I saw the post below which answers my question, need to get the active window information on the dragEnter event method.

Getting active window information in Java

Community
  • 1
  • 1
chichi
  • 1
  • 2