'Pagination in JTable with row sorting
I have implemented pagination in JTable
, in that there is row sorting as well. My problem comes when I click on the column header for sorting it sorts the current view of 10 rows (view size for rows) not the whole data.
I took the pagination code from Passing row value of JTable in Pagination.
Solution 1:[1]
You can create a list with 10 items in wich you put your data from your big list, and create your table with the small list, and when your click on pagination buttons you load new 10 items from the big list to the small one.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Naruto Biju Mode |