🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #7862

JTable Sort

#7862
From: Keith Underwood
Date: Sat, 02 Dec 2000 00:00
12 lines
1325 bytes
To All,
I have a JTable that I want the user to be able to sort the rows by
columns.  Given Columns 'Last_Name',
'First_Name', 'Birth_Date'.  I want to be able to sort the rows by
either of these.  I have looked high and low
and can not find anywhere how to do it..  I know I have to use the
'JTableHeader' class and I have to create a
mouse click listener but I don't know how to put it all together.  If
anyone has an example I would surely appreciate it.  Sun has a program
that is called 'TableSort' but it does not sort the columns.

Keith
Technical Details
Message-ID: <3A297787.74929AE5@gte.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,4c6239b4683f7e0c,start
X-Google-Attributes: gid111d45,public
From: Keith Underwood <keithu@gte.net>
Subject: JTable Sort
Date: 2000/12/02
Message-ID: <3A297787.74929AE5@gte.net>
X-Deja-AN: 700421402
Distribution: world
Content-Transfer-Encoding: 7bit
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
X-Abuse-Info: Otherwise we will be unable to process your complaint properly
X-Complaints-To: abuse@gte.net
X-Trace: /wmC6FyBJAi71HD1+T4tQSo9pIPqByz7apqzBCB6OwaVfVXTpRH25tPxLN+sGUkyNjukJfJkvAnO!MttaAyIxwsjeVYBOL29Rhn+O72AAKwEHH9x52FbY8z5d90R4CnOIaIGq2g==
MIME-Version: 1.0
NNTP-Posting-Date: Sat, 02 Dec 2000 22:27:00 GMT
Newsgroups: borland.public.jbuilder.java.swing