File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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 ]
 
wood burning stoves
 
subject: JTABLE's valuchanged method?