• Post Reply Bookmark Topic Watch Topic
  • New Topic

JTable - prohibit selecting row 2 - rowCount  RSS feed

 
Lisa Zapson
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to prohibit selecting certain rows in a JTable, but not all rows. Any suggestions would be very much appreciated.

Thanks, Lisa
 
prashant gour
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if you have fixed row then use ListSelectionListener and play with these methods in valueChanged

Table.setColumnSelectionAllowed(true);
Table.setRowSelectionAllowed(true);


hope this will fine with you
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!