Results 1 to 3 of 3
  1. #1
    santanu is offline Member
    Join Date
    Oct 2008
    Posts
    5
    Rep Power
    0

    Default Display the data in Descending order

    I am generating data(e.g., 24, 16, 32, 38... etc) in a row/column of a table. Now the data is displaying in random order. I want to display them in Descending order. Can anybody help me how to do this as I am new in Java development.

    I am displaying the data using these lines of code:
    case 1:
    {
    return history.getRssi();
    }

    From this Method:

    public Object getValueAt( int row, int col )
    {
    if( null != histories && 0 <= row && row < getRowCount() )
    {
    try
    {
    History history = histories[row];
    switch( col )
    {
    case 0:
    return ( history.getCheckinTS().length() > 5 ) ? history.getCheckinTS().substring(5) : history.getCheckinTS();
    case 1:
    {
    return history.getRssi();
    }
    case 2:
    return history.getDeviceId();
    } // switch
    }
    catch( Exception e )
    {
    System.out.println( "exception:" + e.toString() );
    System.out.println( e.getStackTrace().toString() );
    }
    } // if ( null != tags && 0 <= row && row < tags.length )
    return "";
    }

  2. #2
    serjant's Avatar
    serjant is offline Senior Member
    Join Date
    Jun 2008
    Location
    Ukraine,Zaporozhye
    Posts
    487
    Rep Power
    7

    Default

    Do you know about array sorts?

  3. #3
    presh4u Guest

Similar Threads

  1. Best GUI Element to Display Mass Data
    By hannehomuth in forum Advanced Java
    Replies: 3
    Last Post: 07-30-2008, 12:18 AM
  2. Replies: 5
    Last Post: 06-06-2008, 10:31 AM
  3. How to display Tabuler Data in J2EE application on jsp page
    By AMATYA-CHANAKYA in forum Advanced Java
    Replies: 2
    Last Post: 04-23-2008, 06:54 PM
  4. Data formatting for the <display:table>
    By yuchuang in forum Web Frameworks
    Replies: 3
    Last Post: 12-14-2007, 11:52 AM
  5. how to display data in Jtree
    By paty in forum New To Java
    Replies: 1
    Last Post: 07-24-2007, 01:28 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
  •