?
Solved

Disable drops for JTextArea (Drag and Drop API)

Posted on 2005-03-29
2
Medium Priority
?
692 Views
Last Modified: 2009-12-16

I have 2 DNDLists (JList extended to use the drag and drop API) and a JTextArea on a JPanel . A bad side-effect with this is that a user is able to drag an item from the DNDList and drop it into a JTextArea. How can I make JTextArea reject drops?

Thanks.
0
Comment
Question by:rakhare
2 Comments
 
LVL 15

Accepted Solution

by:
aozarov earned 500 total points
ID: 13656964
Never tried it myself but do you want to try:
DropTarget d = DropTarget();
d.setActive(false);
jTextAreay.setDropTarget(d);
0
 

Author Comment

by:rakhare
ID: 13657037

Perfect. Thanks.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses
Course of the Month9 days, 4 hours left to enroll

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question