Results 1 to 4 of 4
  1. #1
    samUCF is offline Member
    Join Date
    Mar 2012
    Posts
    2
    Rep Power
    0

    Default How to change the sort order for columns in Jxtable

    I want to change the sorting order of the jxtable.
    For example I want to sort by first column before I sort based on other columns.

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,184
    Rep Power
    19

    Default Re: How to change the sort order for columns in Jxtable

    What's a jxtable? Certainly not part of AWT/Swing, which are the toolkits we discuss in this forum.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    samUCF is offline Member
    Join Date
    Mar 2012
    Posts
    2
    Rep Power
    0

    Default Re: How to change the sort order for columns in Jxtable

    JxTable is a Jtable with some additional features. I have to rephrase the question: Suppose if I have 3 columns (1, 2, 3). If I click on column-2 header, JTable rows should be sorted based on Column-1 first and the sort by Column-2. Same thing should happen when I click Column-3 header (rows should be sorted by Column-1 first and Column-3

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,184
    Rep Power
    19

    Default Re: How to change the sort order for columns in Jxtable

    See the API for TableRowSorter and the method setMaxSortKeys inherited from DefaultRowSorter.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. jxtable sort indicator
    By new2java2009 in forum New To Java
    Replies: 0
    Last Post: 07-18-2011, 06:04 PM
  2. Moving Columns in JXTable with Robot
    By hosscomp in forum AWT / Swing
    Replies: 0
    Last Post: 10-26-2010, 09:54 PM
  3. Access to invisible columns in JXtable
    By new2java2009 in forum New To Java
    Replies: 1
    Last Post: 09-28-2010, 06:08 PM
  4. hidden columns in jxtable
    By new2java2009 in forum New To Java
    Replies: 0
    Last Post: 09-27-2010, 10:13 PM
  5. sort columns in jtable
    By Alan in forum AWT / Swing
    Replies: 2
    Last Post: 05-14-2007, 05:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •