JTable Sorting based on hidden column

后端 未结 3 1446
感情败类
感情败类 2021-01-22 06:17

I would like to sort JTable rows based on one hidden column.

Say I have a JTable like this

column1   column2
val1       val2
3条回答
  •  故里飘歌
    2021-01-22 07:18

    Use code posted here: http://www.esus.com/docs/GetQuestionPage.jsp?uid=1270

    there's variable / method argument col - just check if its yours column2 and if so treat it like it was your hidden column - sort by it and rerender table.

提交回复
热议问题