wood burning stoves 2.0*
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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
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://aspose.com/file-tools
 
subject: Restrict drops to JPanel where it's drags are from.