It's not a secret anymore!*
The moose likes Swing / AWT / SWT and the fly likes JTABLE's valuchanged method? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTABLE Watch "JTABLE New topic
Author

JTABLE's valuchanged method?

Anthony Yulo
Ranch Hand

Joined: Feb 22, 2003
Posts: 52
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....


it's alright, the gun isn't loaded... - hey
Chantal Ackermann
Ranch Hand

Joined: Sep 28, 2000
Posts: 508
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 ]
 
Don't get me started about those stupid light bulbs.
 
subject: JTABLE's valuchanged method?
 
Similar Threads
Using cell editors in JTable
Taking Suggestions
Table cells value changing on double click
Disabling Cell Focusing in JTable
Setting focus to a table row