aspose file tools
The moose likes Swing / AWT / SWT and the fly likes Restrict drops to JPanel where it's drags are from. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "Restrict drops to JPanel where it Watch "Restrict drops to JPanel where it New topic
Author

Restrict drops to JPanel where it's drags are from.

Matt Kurz
Ranch Hand

Joined: Jan 02, 2010
Posts: 40
The attached screenshot consists of 2 JPanels. Each has 2 JLists. I want to allow drag and drop only inside one JPanel. For instance drops from TopPanel to ButtomPanel or complete outside to desktop or something else should NOT be allowed. My solution already works panel specific, but drops outside are still possible. How can I deactivate that? Here is the standalone example code:




[Thumbnail for 2panels.jpeg]

 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Restrict drops to JPanel where it's drags are from.
 
Similar Threads
How to change mouse cursor during drag and drop
Drag cursor not changing, but drop succeeding.
Pasting image in JTable cells
Drag and Drop between 2 JLists - ReportingListTransferHandler
drag and drop DND click, then move??