?
Solved

Disable drops for JTextArea (Drag and Drop API)

Posted on 2005-03-29
2
Medium Priority
?
686 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses
Course of the Month9 days, 23 hours left to enroll

762 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