The JavaTM Tutorial
Previous Page Trail Contents Next Page Start of Tutorial Search
Feedback Form

Trail: Drag and Drop

One day we'll have a trail here. For now, here are some links to resources and examples:

Swing Data Transfer(outside of the tutorial)
Tells how to use the drag-and-drop support built into Swing components in v 1.4. Required reading for 1.4 users!

JavaBeans home page(outside of the tutorial)
Indirectly links to the Drag and Drop specification; might have other information related to Drag and Drop.

SwingDrop.java(in a .java source file)
A rough example showing plain-text drag-and-drop with a JTextArea. Prints diagnostics. This example is obsolete as of v 1.4.

A Drag and Drop Example by Sheetal Gupta
This example contains two JLists. You can drag an item from either list and drop it onto the other list. Demonstrates that a single component can be both a Drag Source and a Drop Target. Prints diagnostics. This example is obsolete as of v 1.4. You can also search the Web sites listed in Online Resources for Java Programmers for drag-and-drop articles and examples. If you can recommend any other examples or resources, please tell us.

Previous Page Trail Contents Next Page Start of Tutorial Search
Feedback Form

Copyright 1995-2002 Sun Microsystems, Inc. All rights reserved.