Article View: borland.public.jbuilder.java.swing
Article #8424Re: Multi-row select in jdbTable and customized row header?
From: Olaf Raether
Date: Thu, 17 Aug 2000 00:00
Date: Thu, 17 Aug 2000 00:00
39 lines
1389 bytes
1389 bytes
On Thu, 17 Aug 2000 10:43:14 +0300, "X_Aki Nieminen_X" <no@email.abc> wrote: >Win98/JB3.5Pro > >Anyone has sample code to be provided, I am using jdbTable component >attached to dataset. > >1) How to select multiple rows from the table with CTRL + mouse click? >How to iterate through selection rows? try jdbTable1.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION ); to enable multiselection use jdbTable1.getSelectedRows(); to get the selected rows. > >2) How to implement customized row header with an icon when row is modified? >row header should have a row number + icon if modified. For the Header, you must set the Renderer. jdbTable1.getColumn(index).setHeaderRenderer(new DefaultTableCellRenderer()); The default Renderer is a DefaultTableCellrenderer which extends a JLabel. So you can use setIcon. Hope this help Olaf Raether o.Raether@windsoft.de
Technical Details
Message-ID:
<399b97fe.8158160@forums.inprise.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<399b9431$1_2@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,3e2c3ee4991cc136 X-Google-Attributes: gid111d45,public From: o.raether@windsoft.de (Olaf Raether) Subject: Re: Multi-row select in jdbTable and customized row header? Date: 2000/08/17 Message-ID: <399b97fe.8158160@forums.inprise.com> X-Deja-AN: 659247424 References: <399b9431$1_2@dnews> Organization: Another Netscape Collabra Server User Newsgroups: borland.public.jbuilder.java.swing