Article View: borland.public.jbuilder.java.swing
Article #9050how to create a read-only JTable?
From: M Le
Date: Wed, 07 Jun 2000 00:00
Date: Wed, 07 Jun 2000 00:00
19 lines
1133 bytes
1133 bytes
Hi, Is there an easy way of forcing the entired JTable not editable? I've looked thru all the JTable API, hoping to find some thing like setEditable(boolean), but couldn't find any. There's a isCellEditable() method, but no setCellEditable(). I have a simple table with all cells contain simple, short text entries. I need them to be read only. I'm guessing that I need to use a JTextField for each cell, and then setEditable(false) on each cell? This is rather tedious. I supposed I could extend JTextField and make my own non-editable cell object, but all of this just to make a read-only text table? Any suggestion? Thanks! -ML
Technical Details
Message-ID:
<393ed7a6@dnews>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,6cc3b685d29e3672 X-Google-Attributes: gid111d45,public From: "M Le" <wildcard_mcl@hotmail.com> Subject: how to create a read-only JTable? Date: 2000/06/07 Message-ID: <393ed7a6@dnews> X-Deja-AN: 632384865 X-Trace: 7 Jun 2000 16:15:50 -0800, 24.21.80.2 X-MSMail-Priority: Normal X-Priority: 3 Newsgroups: borland.public.jbuilder.java.swing X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700