• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Matt Kurz
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:


2panels.jpeg
[Thumbnail for 2panels.jpeg]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic