Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2010
    Rep Power

    Default JTable: Disable sorting on one column

    I am creating a Swing application which uses an Jtable with multiple columns. One of the columns shows a small ImageIcon. The user is allowed to sort the table by clicking on one of the columnheaders, but I don't want them to sort the table based on the column with ImageIcons.

    Currently I have implemented sorting with
    Java Code:
    , but now the user can select the column with the imageicons.

    How can I implement this requirement?

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Madgaon, Goa, India
    Rep Power


    Don't auto create the row sorter, create it yourself. See the API for TableRowSorter and its superclass DefaultRowSorter.


Similar Threads

  1. Replies: 1
    Last Post: 07-28-2010, 03:46 PM
  2. split a jtable column
    By anilkumar_vist in forum Advanced Java
    Replies: 0
    Last Post: 12-14-2009, 11:29 AM
  3. split jtable column
    By anilkumar_vist in forum Advanced Java
    Replies: 3
    Last Post: 11-30-2009, 03:14 PM
  4. Sorting in JTable without clicking on column headers
    By ProgrammingPup in forum Advanced Java
    Replies: 6
    Last Post: 11-04-2009, 06:26 AM
  5. Sorting a SWT table by column
    By Java Tip in forum SWT Tips
    Replies: 0
    Last Post: 07-11-2008, 03:07 PM

Tags for this Thread

Posting Permissions

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