File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JTable column editable but not selectable

 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings,
Below is some sample code that creates a JTable with a column of checkboxes and a column of strings.
When I click on one of the checkboxes, not only does its value toggle, the entire row is selected.
What I would like is to only toggle the value and not select the row.
However, if I click on the string column, I would like the row to be selected.
I have not discovered how to achieve this and would be very grateful if someone could show me.

Thanks,
Avi.

 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the help ;-)
Discovered method shouldSelectCell in interface javax.swing.CellEditor.
Problem resolved!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic