JTable Clickable Column Sorting: Sorting sorts content of cells, but doesn't update cell formatting?

前端 未结 2 1531
臣服心动
臣服心动 2020-12-15 19:07

I have a sortable JTable set up to use a custom extension of the AbstractTableModel. However, some behavior of this table is what I expected, and I

2条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-15 19:43

    You can enable table sorting by clicking on header using this table.setAutoCreateRowSorter(true);

    for more information visit this site http://www.codejava.net/java-se/swing/6-techniques-for-sorting-jtable-you-should-know

提交回复
热议问题