Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to diable a entire column in JTable?  RSS feed

 
Sri Rangan
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have to make a particualr column non editable. How can I do that?
Thanks
Sri
 
Rene Liebmann
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have to do that in your TableModel. The table model must implement a method public boolean isCellEditable(int row, int col). There you decide weather the cell is editable or not.
Regards
Rene
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!