🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Disabling JTable

#9273
From: Philip Fourie
Date: Wed, 19 Apr 2000 00:00
41 lines
1912 bytes
Thanks for your help, but I think I haven't explained my problem correctly.

I have a Master-Detail situation.
The table list all the possible records on the left side and when the user
selects an item in the table it shows that item on the right side.

The user can then change the detail, but I don't want him to select another row
in the JTable until he has applied his current changes. Therefore I want to
disable the grid.

The user must not be able to change the row selection for a certian period.

Greg Hamer wrote:

> If you mean make it so that you can no longer edit any of the columns, I
> have not figured out how to do this without resorting to subclassing it and
> overriding
> editCellAt:
>
>  private JTable myGrid = new JTable() {
>        public boolean editCellAt(int row, int column, java.util.EventObject
> e){
>          if (isEnabled())
>            return super.editCellAt(row,column,e);
>          else
>            return false;
>        }
> }
>
> Philip Fourie <pcfourie@bigfoot.com> wrote in message
> news:8dhtha$g645@bornews.borland.com...
> > How do I disable the JTable?
> > The setEnabled(false) method does not do what I expected. I want to
> "freeze"
> > the table for a while.
> > How will go I about doing this?
> >
> > Thank you
> > Philip
> >
> >
Technical Details
Message-ID: <38FD83E0.1C0EB9FD@bigfoot.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <8dhtha$g645@bornews.borland.com> <8div0m$q214@bornews.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,2914d1c40683056f
X-Google-Attributes: gid111d45,public
From: Philip Fourie <pcfourie@bigfoot.com>
Subject: Re: Disabling JTable
Date: 2000/04/19
Message-ID: <38FD83E0.1C0EB9FD@bigfoot.com>
X-Deja-AN: 613071433
Content-Transfer-Encoding: 7bit
References: <8dhtha$g645@bornews.borland.com> <8div0m$q214@bornews.borland.com>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing