Results 1 to 6 of 6
  1. #1
    new2java2009 is offline Member
    Join Date
    Aug 2009
    Posts
    60
    Rep Power
    0

    Default Table column sort

    There is this JTable, all the columns are sortable, but there is no row sorter decleared. Does anybody know how to set the table columns sortable without a row sorter? Thanks!

  2. #2
    camickr is offline Senior Member
    Join Date
    Jul 2009
    Posts
    1,226
    Rep Power
    6

    Default

    No idea what you are asking.

    Read the JTable API and follow the link to the Swing tutorial on "How to Use Tables" for a working example on sorting.

    If you need more help post your SSCCE showing the problem.

  3. #3
    new2java2009 is offline Member
    Join Date
    Aug 2009
    Posts
    60
    Rep Power
    0

    Default

    Thanks for responding.
    I am trying to understand the code behide this table. The columns are sortable when I run the app, but I don't see anywhere in the code that a row sorter is created/used. So I am wondering:
    1. Is it even possible to set all the columns sortable without using a row sorter? I thought the answer was no, so I am very confused.
    2. If it is possible, how? If anybody can point me to what I should look for in the code that would be great.
    3. When a table is created by default, are the columns sortable?
    Thanks!

  4. #4
    camickr is offline Senior Member
    Join Date
    Jul 2009
    Posts
    1,226
    Rep Power
    6

    Default

    but I don't see anywhere in the code that a row sorter is created/used.
    Me either because I don't see the SSCCE.

  5. #5
    new2java2009 is offline Member
    Join Date
    Aug 2009
    Posts
    60
    Rep Power
    0

    Default

    I would post the code if I could, but my company doesn't allow it.
    That's why I asked what I thoght were general questions... anyhow...
    Have you ever seen a table with sortable columns without a row sorter?

  6. #6
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default

    Your company doesn't allow its code to be displayed, and that's not what we're asking for. We're asking for you to create a small program that is not from your company's code base, but that demonstrates the problem you're encountering. Doing this should run you afoul of no rules. Luck.

Similar Threads

  1. table column sort
    By new2java2009 in forum New To Java
    Replies: 8
    Last Post: 04-16-2010, 01:17 AM
  2. Non-Editable Table Column
    By ld_pvl in forum AWT / Swing
    Replies: 6
    Last Post: 08-03-2009, 06:35 PM
  3. Replies: 0
    Last Post: 07-11-2008, 04:30 PM
  4. Sorting a SWT table by column
    By Java Tip in forum SWT
    Replies: 0
    Last Post: 07-11-2008, 03:07 PM
  5. How to sort column in JTable
    By johnt in forum AWT / Swing
    Replies: 3
    Last Post: 06-14-2008, 05:48 AM

Posting Permissions

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