
Sorting for a JTable
Hi,
Are there any code samples available which implements mulitple column sorting
on a JTable?That is, values based on the first column are sorted, then second
column is sorted without disturbing the sorting of the first.
eg:
1 11 12
2 22 22
1 12 11
2 21 23
1 10 11
will should be sorted into
1 10 11
1 11 12
1 12 11
2 21 23
2 22 22
if sorting is required on the first two columns
TIA,
Ramkumar

Re: Sorting for a JTable
Mr.ramkumar,
you have to sort the table on second coloumn and then group by the first
colomn then u will get the desired
output.
"Ramkumar" <ramkuma@usa.net> wrote:
>
>Hi,
>Are there any code samples available which implements mulitple column sorting
>on a JTable?That is, values based on the first column are sorted, then second
>column is sorted without disturbing the sorting of the first.
>
>eg:
>
>1 11 12
>2 22 22
>1 12 11
>2 21 23
>1 10 11
>
>will should be sorted into
>1 10 11
>1 11 12
>1 12 11
>2 21 23
>2 22 22
>if sorting is required on the first two columns
>
>TIA,
>Ramkumar
>
>
>
>