Demo - BasicDnD (The Java™ Tutorials > Creating a GUI With JFC/Swing > Drag and Drop and Data Transfer) Now we will look at a simple demo, called BasicDnD, that shows you what you get for free. As you see from the screen shot, BasicDnD contains a table, a list, a tree, a color chooser, a text area, and a text field. All of these components are standard out-of-the-box components except for the list. This list has been customized to bring up a dialog showing where the drop would occur, if it accepted drops. The following areas accept drops: Text fieldText areaThe color chooser accepts drops of type color, but in order to try this, you need to run two copies of the demo (or another demo that contains a color chooser) By default, none of the objects has default drag and drop enabled. This figure has been reduced to fit on the page.
Try this:Click the Launch button to run BasicDnD using Java™ Web Start (download JDK 7 or later). Next we will look at the TransferHandler class, the workhorse of the drag and drop mechanism. Getting Cell Values in a JTable. Getting the Selected Cells in a JTable Component. Chop. Chop_DB Connetion. Openpaste - collaborative debugging tool.