Article View: borland.public.jbuilder.java.swing
Article #9626Re: Hidden Rows in JTable
From: John P. McGrath
Date: Wed, 23 Feb 2000 00:00
Date: Wed, 23 Feb 2000 00:00
18 lines
1145 bytes
1145 bytes
On Tue, 22 Feb 2000 21:57:01 +0500, Omer Azhar Qureshi wrote: > i need to hide a row in JTable, what i mean is that when the > user selects and removes a row i want to hide it in the table > instead of removing it from the model You could write a filtering TableModel class that allows you to hide a row. It would keep track of which rows are hidden, and map the row numbers from one model to the other. You could also do this by extending the TableModel that you will be using. This would not allow it to be used with other table models, but would not require you to write a lot of forwarding methods. -- John P. McGrath <JPMcGrath@fast.net> <jpm@nscs.fast.net>
Technical Details
Message-ID:
<MPG.131d4119a5e4d14c9897b4@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<88uema$53c8@bornews.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,108e50cec8889e5e X-Google-Attributes: gid111d45,public From: John P. McGrath <JPMcGrath@fast.net> Subject: Re: Hidden Rows in JTable Date: 2000/02/23 Message-ID: <MPG.131d4119a5e4d14c9897b4@forums.borland.com> X-Deja-AN: 588710235 References: <88uema$53c8@bornews.borland.com> Organization: Another Netscape Collabra Server User Newsgroups: borland.public.jbuilder.java.swing