aspose file tools
The moose likes Swing / AWT / SWT and the fly likes JTable ActionListener 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 ActionListener" Watch "JTable ActionListener" New topic

JTable ActionListener

aulo aasmaa

Joined: Aug 06, 2001
Posts: 15

JTable with many rows. When user scrolls then the current row number should be displayed on one JLabel.
I have other parts ready, but I don't know how to listen to the JTable.
Current idea that doesn't work:

Would be wery delighted if smb could point out the bug in this code.
[This message has been edited by aulo aasmaa (edited August 09, 2001).]
aulo aasmaa

Joined: Aug 06, 2001
Posts: 15
I now know the reason:
The JLable text is updated right after I press the arrow keys, but the "cursor" is moved after that, ie I have to move to
ListSelectionEvent listener.
It is sorta covered in the JavaRanch Style Guide.
subject: JTable ActionListener