Only 48 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JTable configuration  RSS feed

 
Hanna Habashy
Ranch Hand
Posts: 532
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi:
How can I make a JTable non editable and its rows selectable at the same time.
I want to make the user to be able to highlight a row, but not allowed to edit the table.
thanks
 
Jose Botella
Ranch Hand
Posts: 2120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Searching the API I find out that there is not a proper setEditable method, thus we need to override TableModel.isCellEditable(row, column) to return false for every cell.

 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!