Results 1 to 2 of 2

Thread: JTable Help

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2002
    Posts
    86

    JTable Help

    Ok, heres the situation. I have a Jtable with 7 columns and many rows. I want to be able to sort the columns when the header is clicked on. I've search on Google and the API for anything like this, but found nothing of good use.
    Does anyone have an idea on how to do this?

    Also in the JTable, I want to be able to double click on a row and it opens that file corresponding to the row. The columns basically have info about the file. Again, I searched and nothing. Any ideas?

  2. #2
    Frenzied Member System_Error's Avatar
    Join Date
    Apr 2004
    Posts
    1,111

    Re: JTable Help

    Sorting the columns would be pretty easy. Add a mouselistener to the table headers, then get the index that was selected, and then use the convertColumnIndexToModel method.

Posting Permissions

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



Click Here to Expand Forum to Full Width