9 Replies Latest reply: Mar 31, 2010 9:11 AM by 843807 RSS

    Programmatically driven DnD ( Drag and Drop ) operation

      First off to give the big picture: what I'm trying to do is to extend an existing Java application to support multi-touch input. I get TUIO (www.tuio.org) messages, basically containing x,y-coordinates of the finger tips and want to control the application by that.
      Sending MouseEvents with Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(...) did work for basic point and click, but when I try to do some Drag and Drop the pointer just stops after the DragGesture started.
      Is this due to the fact that I'm using SwingUtilities.getDeepestComponentAt(myComponent, x, y) to determine the source for the new MouseEvent? Do I have to use something completely different here?
      I found some words about programmatically driven DnD in the package summary of java.awt.dnd, but there is not much detail about that. Maybe someone could provide more information about that? And do I have to use this approach at all?