Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

JavaWorld Daily Brew

Conditional DnD / Cut Copy Paste based on same class but with different state


Tags:

Back to:
www.javaworld.com/javaworld/javatips/jw-javatip61.html
.

Thanks for the fantastic tips. The only question I have left is how can I add logic to prevent an object from being dropped under some circumstances based on the object's state. For example, in your discussion a DataFlavor is defined for java.awt.Button. How could I prevent some "drop enabled" widgets from receiving the drop for Buttons that have a caption of "foo"? I presume it is undesirable and inefficient to serialize the object to test it while the mouse is being dragged... Any thoughts?

Your rating: None