my dog learned polymorphism
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 Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTABLE Watch "JTABLE New topic

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
why don't you attach a SelectionListener to the SelectionModel of the JTable. This would be the normal way to listen to selection changes.
[ April 09, 2003: Message edited by: Chantal Ackermann ]
subject: JTABLE's valuchanged method?
It's not a secret anymore!