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 a JTable uneditable ???  RSS feed

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone know the easiest way of making an entire table uneditable when it is displayed by a java program ???
 
Matt Hansen
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you need to make a TableModel and implement the isCellEditable method to always return false. You can just extend the DefaultTableModel and then you only have to implement this method. Then just set your table to use this model.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!