java.awt.dnd.InvalidDnDOperationException: Cannot find top-level for the drag source component

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via Coderanch by Yahya Elyasse, 1 year ago
Cannot find top-level for the drag source component
via Oracle Community by 843805, 10 months ago
Cannot find top-level for the drag source component
via Oracle Community by 843806, 1 month ago
Cannot find top-level for the drag source component
via java-forums.org by Unknown author, 1 year ago
Cannot find top-level for the drag source component
via knowcoding.com by Unknown author, 1 year ago
Cannot find top-level for the drag source component
via Stack Overflow by Randbedingung
, 1 year ago
Cannot find top-level for the drag source component
java.awt.dnd.InvalidDnDOperationException: Cannot find top-level for the drag source component
at sun.awt.X11.XDragSourceContextPeer.startDrag(XDragSourceContextPeer.java:105)
at sun.awt.dnd.SunDragSourceContextPeer.startDrag(SunDragSourceContextPeer.java:111)
at java.awt.dnd.DragSource.startDrag(DragSource.java:306)
at java.awt.dnd.DragSource.startDrag(DragSource.java:403)
at treetable.TreeDragSource.dragGestureRecognized(TreeDragSource.java:67)
at sun.awt.X11.XMouseDragGestureRecognizer.mouseDragged(XMouseDragGestureRecognizer.java:202)
at java.awt.AWTEventMulticaster.mouseDragged(AWTEventMulticaster.java:262)
at java.awt.Component.processMouseMotionEvent(Component.java:5536)
at javax.swing.JComponent.processMouseMotionEvent(JComponent.java:3144)
at java.awt.Component.processEvent(Component.java:5257)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at javax.swing.plaf.basic.BasicTableUI$Handler.repostEvent(BasicTableUI.java:900)
at javax.swing.plaf.basic.BasicTableUI$Handler.mouseDraggedImpl(BasicTableUI.java:1044)
at javax.swing.plaf.basic.BasicTableUI$Handler.mouseDragged(BasicTableUI.java:1040)
at java.awt.AWTEventMulticaster.mouseDragged(AWTEventMulticaster.java:262)
at java.awt.AWTEventMulticaster.mouseDragged(AWTEventMulticaster.java:261)
at java.awt.Component.processMouseMotionEvent(Component.java:5536)
at javax.swing.JComponent.processMouseMotionEvent(JComponent.java:3144)
at java.awt.Component.processEvent(Component.java:5257)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3909)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

Users with the same issue

Samebug visitor profile picture
Unknown user
2 times, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.