🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Disabling JTable

#9367
From: Greg Hamer
Date: Tue, 18 Apr 2000 00:00
27 lines
1272 bytes
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: <8div0m$q214@bornews.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <8dhtha$g645@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: "Greg Hamer" <ghamer@corp.netzero.net>
Subject: Re: Disabling JTable
Date: 2000/04/18
Message-ID: <8div0m$q214@bornews.borland.com>
X-Deja-AN: 612928211
References: <8dhtha$g645@bornews.borland.com>
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Organization: Another Netscape Collabra Server User
X-MSMail-Priority: Normal
Newsgroups: borland.public.jbuilder.java.swing