Article View: borland.public.jbuilder.java.api
Article #1029Hiding columns in a JTable
From: Paul Trimming
Date: Tue, 30 Apr 2002 18:52
Date: Tue, 30 Apr 2002 18:52
19 lines
1802 bytes
1802 bytes
Hello, I am a beginner with Java, and am doing my first JTable. I have constructed a table using a TableModel, and populated four columns using Object arrays filled from a database resultset. You can only select by rows in this table. Now for each row I want to attach a hidden key, so that when I click on a row, I can retrieve the key, and use it to find related information in the database. The only trouble is that I do not want to display the key visibly in the JTable. Is there any way of creating an extra column in the JTable, but hiding it?? Or do I have to have an extra Object in the TableModel Object array?? If so, how do I retrieve the Object value?? Advice humbly sought...! Thanks, Paul Trimming
Technical Details
Message-ID:
<bJBz8.288$xa.28212@news8-gui.server.ntli.net>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!supernews.com!194.159.246.34.MISMATCH!kibo.news.demon.net!demon!peernews!peer.cwci.net!news4-gui.server.ntli.net!ntli.net!news8-gui.server.ntli.net.POSTED!53ab2750!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,261be982731a9ea2,start X-Google-Attributes: gid1089d0,public X-Google-ArrivalTime: 2002-04-30 11:52:06 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!supernews.com!194.159.246.34.MISMATCH!kibo.news.demon.net!demon!peernews!peer.cwci.net!news4-gui.server.ntli.net!ntli.net!news8-gui.server.ntli.net.POSTED!53ab2750!not-for-mail From: "Paul Trimming" <paul.trimming@ntlworld.com> Newsgroups: borland.public.jbuilder.java.api Subject: Hiding columns in a JTable Lines: 21 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Message-ID: <bJBz8.288$xa.28212@news8-gui.server.ntli.net> Date: Tue, 30 Apr 2002 19:52:58 +0100 NNTP-Posting-Host: 80.0.72.173 X-Complaints-To: abuse@ntlworld.com X-Trace: news8-gui.server.ntli.net 1020192711 80.0.72.173 (Tue, 30 Apr 2002 19:51:51 BST) NNTP-Posting-Date: Tue, 30 Apr 2002 19:51:51 BST Organization: ntl Cablemodem News Service