Article View: borland.public.jbuilder.java.swing
Article #11117Re: JTABLE&&SORTING
From: Mark Kent
Date: Thu, 08 Jul 1999 00:00
Date: Thu, 08 Jul 1999 00:00
53 lines
2505 bytes
2505 bytes
This is a multi-part message in MIME format. --------------D4A1CABCA57A6DB1BCAF4532 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi Peter: Go to http://www.javasoft.com. From there you can search for "Sorting". Javasoft will provide you with a few classes and examples on how to do this. Basically you need TableDataModel.java and TableSorter.java. I have taken these files myself and expanded on them so that you can sort multiple columns and other harder things. -Good luck peter wrote: > Hi everybody - here is my problem. I have implemented sorting on JTable. > Unfortunately this change is only graphical - but it doesn't make any > change to > structure (array or vector) which was used to create table model...now > I am filling model with array of records comming from server...then I > sort ..then I click > on row...getting integer to identify selected > row(table.getSelectedRow()) and want to take this row and send it > somewhere else...I use selected row to get it > from table model (getValue(row,column)) unfortunately this correspond > to the row which was there before sorting took place..I mean sorting > didn't change > array inside table model...therefore I am sending incorrect > row....anybody has any remedy to this???...thanx...Pete --------------D4A1CABCA57A6DB1BCAF4532 Content-Type: text/x-vcard; charset=us-ascii; name="markk.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Mark Kent Content-Disposition: attachment; filename="markk.vcf" begin:vcard n:Kent;Mark tel;work:(401) 726-7937 x-mozilla-html:FALSE org:MHRI;Information Services adr:;;111 Brewster St.;Pawtucket;RI;02860;U.S.A. version:2.1 email;internet:markk@mhri.org note;quoted-printable:****************************=0D=0AHave a Disney Day=0D=0A**************************** x-mozilla-cpt:;-26464 fn:Mark Kent end:vcard --------------D4A1CABCA57A6DB1BCAF4532--
Technical Details
Message-ID:
<3784FEE6.2B3652BA@mhri.org>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3784BC67.8358E909@terren.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,5267c1252c085083 X-Google-Attributes: gid111d45,public From: Mark Kent <markk@mhri.org> Subject: Re: JTABLE&&SORTING Date: 1999/07/08 Message-ID: <3784FEE6.2B3652BA@mhri.org> X-Deja-AN: 498800799 References: <3784BC67.8358E909@terren.com> X-Accept-Language: en Content-Type: multipart/mixed; boundary="------------D4A1CABCA57A6DB1BCAF4532" Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing