1

I basically wanted to do multiple selection on words Ex: select 10 words from JTextPane and drag it and drop it into JTable.

I was able to multiple highlighting the words but if word is highlighted ,I was not able to drag and drop it to destination area.

If it is possible please let me know what is the function to do the operation

any help regarding this would be great!

Aravind Krishnakumar
  • 2,727
  • 1
  • 28
  • 25
  • That's not actually a simple thing. Apart from the issue of the fact that dragging on text pane cause selection highlighting, you would need to extract the text you want from the document, compile it into some kind of `Transferable` and when dropped, unpack it all. For a [basic example of drag'n'drop](http://stackoverflow.com/questions/15520610/java-drag-and-drop/15521421#15521421) – MadProgrammer Oct 26 '14 at 06:56

0 Answers0