Swing: how do you drag multiple rows from a JTable?
I have a JTable. If my selection mode is ListSelectionModel.SINGLE_SELECTION
, I can drag data from the table elsewhere and it works fine.
But if my selection mode is ListSelectionModel.MULTIPLE_INT开发者_运维技巧ERVAL_SELECTION
, when I go to drag the data, it resets the selection to a single selection.
How can I drag multiple rows from a JTable?
EDIT
Drag and drop of multiple rows should work by default, with or without setting the selection mode. With the caveat that drag is enabled on your JTable.
精彩评论