Problems with JTable sorting of integer values

前端 未结 6 1047
故里飘歌
故里飘歌 2020-12-21 10:44

Currently I have a JTable that uses RowSorter, but when I click the header that I want it to sort in, it displays the rows in a weird order

6条回答
  •  不思量自难忘°
    2020-12-21 11:30

    You're treating the row contents as text. Your sort order is alphabetical rather than numerical. If you treat the contents as numbers it should work itself out.

提交回复
热议问题