Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How's Drag and Drop Working for You?



Drag and drop is working well for me on Windows XP and Mac OS X. I
suspect that my method is old, however. I bought a newer Swing book
and, apparently, there is a much simpler way to do it now.

The user is presented with a tree of contacts (like in an address book)
and when they click on one, the person or companies information appears
in the right-hand pane. The user can drag any node in the tree to any
other node in the tree to make the dragged node a child of the node
they dropped it on.

I created my own Transferable object and it contains a
DefaultMutableTreeNode. I then wrote a class that extends JTree and has
a Drag Source, Gesture, and Target listener and can handle scrolling
during a drag. It's been a while, but I believe I followed a chapter in
the O''Reilly Swing book to get this working.

-- Miles

On Feb 2, 2004, at 2:09 PM, John Brewer wrote:

> I've looked through the archives and run accross lots of people having
> problems with Drag and Drop. I'd like to hear about people who have
> been successful using it.
>
> Are you using Drag and Drop in your app?
> How's it working for you?
> Are you using any custom data flavors in conjunction with other native
> apps?
> --
>
> John Brewer
> Jera Design

[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Be sure to read the FAQ http://developer.apple.com/java/faq/ before posting
Do not post admin requests to the list. They will be ignored.

References: 
 >How's Drag and Drop Working for You? (From: John Brewer <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.