• Post Reply Bookmark Topic Watch Topic
  • New Topic

JTable ActionListener  RSS feed

 
aulo aasmaa
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Background:

JTable with many rows. When user scrolls then the current row number should be displayed on one JLabel.
Problem:
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
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
OK!
AUlo
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!