开发者

Swing: how do you drag multiple rows from a JTable?

开发者 https://www.devze.com 2023-03-22 04:38 出处:网络
I have a JTable. If my selection mode is ListSelectionModel.SINGLE_SELECTION, I can drag data from the table elsewhere and it works fine.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消