简体   繁体   中英

Row header in JTable with same drag/drop behaviour as column header

I'm trying to have row headers in my JTable which have similar behaviour to the column headers, especially for the drag and drop part.

Something like this: JTable Row Header Implementation

And when I drag the row header, it should have the same visual effect as when I drag the column header and the same result (row/column is moved).


So far, one way I thought of is to create my own custom BasicTableHeaderUI and implement the paint() method. Not sure if that will cause problems if other look and feels were used?

您可以将D&D侦听器添加到表单元格或整个表,然后将事件传递到处理标头上D&D事件的EventHandler。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM