views:

131

answers:

2

I have a DropTargetListener setup to allow me to drag + drop strings into some tables of my Swing application -- on a drop, I parse the string and insert data into the table.

I would like to do the same thing with a clipboard paste (Ctrl-V). What literature is there to explain how to handle clipboard pastes? I'm looking at some stuff from Sun's website and it seems bizarre, like this should be simpler.

+2  A: 

I would instead suggest you to take a look at java.awt.datatransfer.Clipboard class documentation. I think it will go along with your DnD operations.

Riduidel
+1  A: 

As shown in the intro and the ListCutPaste demo, the two are connected. The DnD gets you CCP automatically.

trashgod