🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Hidden Rows in JTable

#9626
From: John P. McGrath
Date: Wed, 23 Feb 2000 00:00
18 lines
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-mail
References: <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