Article View: borland.public.jbuilder.java.swing
Article #10109JTable: isCellEditable
From: Michael Kintzer
Date: Mon, 08 Nov 1999 00:00
Date: Mon, 08 Nov 1999 00:00
18 lines
1369 bytes
1369 bytes
I have a JTable constructed with a subclass of DefaultTableModel. In my implementation of MyDefaultTableModel, I override isCellEditable to return true or false conditionally based on the value in a particular column. If the cell is not editable, I use a renderer to render the cell's background gray. My problem is that if the column's are moved around, in some cases, even though isCellEditable is (correctly) returning false, and the renderer is correctly showing the gray background for what should be a non-editable cell, the JTable prepares an editor anyway. The reverse is also true, after I move the columns around. i.e. isCellEditable returns true (correctly), and the renderer paints a white background (again correctly), but the JTable fails to create an editor. Is this a bug in JTable? Thanks for any insights, Michael Kintzer
Technical Details
Message-ID:
<38271072.A2C78F4E@atm.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,c849c62cef13890,start X-Google-Attributes: gid111d45,public From: Michael Kintzer <michaeki@atm.com> Subject: JTable: isCellEditable Date: 1999/11/08 Message-ID: <38271072.A2C78F4E@atm.com> X-Deja-AN: 545994469 Content-Transfer-Encoding: 7bit Organization: Another Netscape Collabra Server User X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing