Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JTABLE's valuchanged method?

 
Anthony Yulo
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I understand, that the value changed method is called only internally by Jtable... so that it can respond when users click on particular rows... so it will changed the display by highlighting on the particular row...
Now can i override that method so that in addition to highlighting the particular row, i will do my program -specific task... because that task will only be done when a user clicks on a different row...
I can't use a normal mouseclick event coz it will still generate even if i clicked on the same row....
 
Chantal Ackermann
Ranch Hand
Posts: 508
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
why don't you attach a SelectionListener to the SelectionModel of the JTable. This would be the normal way to listen to selection changes.
chantal
[ April 09, 2003: Message edited by: Chantal Ackermann ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic