DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2

Hybrid View

  1. #1
    Ramkumar Guest

    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





  2. #2
    tejkumar Guest

    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
    >
    >
    >
    >



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links