Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to make JTable as Non-Editable  RSS feed

 
S Shankar
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I got to show certain values to the user as non-editable in JTable.
I am using a DefaultTableModel in my JTable. I want to make my
entire Table as non-editable. And, also a certain part of the row/column
as non-editable in another JTable
Thanx,
- Shankar S
 
Brent Worden
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Override public boolean isCellEditable(int rowIndex, int columnIndex) in your TableModel.

------------------
Brent Worden
http://www.Brent.Worden.org/
[This message has been edited by Brent Worden (edited December 26, 2000).]
 
sandeep vijan
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
to make entire table as uneditable provide a
label as a cell renderer.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!