0

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.

Community
  • 1
  • 1
Rahul S Tomar
  • 121
  • 10

1 Answers1

0

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.

Naruto Biju Mode
  • 2,011
  • 3
  • 15
  • 28
  • Row filter is doing that in the code, my issue comes when I try to sort it because sorting is done in Jtable not the tableModel and I don't want to sort the tableModel. Can you please provide an example for you answer – Rahul S Tomar Nov 26 '14 at 06:19