Results 1 to 4 of 4
  1. #1
    johnt is offline Super Moderator
    Join Date
    Apr 2007
    Posts
    30
    Rep Power
    0

    Default How to sort column in JTable

    I want to sort the columns based on the data, for example if the column holds chars the sort should be based on alphabetical order and if the column is of type int the sort is based on ascending or descending.


    Can any one tell me how to do it or get me the source code for the functionality, any help is highly appreciated.

  2. #2
    levent Guest

    Default

    Java tutorial has a nice example for this. Please check the following url:

    How to Use Tables (The Java™ Tutorials > Creating a GUI with JFC/Swing > Using Swing Components)

  3. #3
    inspiron is offline Member
    Join Date
    May 2008
    Posts
    7
    Rep Power
    0

    Default inspiron

    hello ,
    i was engaged in my exam so that why i was untouched but from today i will regularly participate in this forums because i love this forums and i
    very appriciated all members who gives answers to other members .
    :)

  4. #4
    inspiron is offline Member
    Join Date
    May 2008
    Posts
    7
    Rep Power
    0

    Default

    hi,
    i made a student data base with all student records but i want to put search option that search by name all the students .any one give me direction how use search logic in code thanks .

Similar Threads

  1. insert row and column and delete row and column
    By daredavil82 in forum New To Java
    Replies: 13
    Last Post: 09-22-2011, 07:10 PM
  2. How to sort a list using Bubble sort algorithm
    By Java Tip in forum Algorithms
    Replies: 3
    Last Post: 04-29-2008, 09:04 PM
  3. Excel Column
    By Gajesh Tripathi in forum New To Java
    Replies: 2
    Last Post: 04-13-2008, 03:26 PM
  4. add a jlist column
    By Alan in forum JCreator
    Replies: 1
    Last Post: 05-28-2007, 05:51 AM
  5. sort columns in jtable
    By Alan in forum AWT / Swing
    Replies: 2
    Last Post: 05-14-2007, 06: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
  •