Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JTable particular info needed  RSS feed

 
Shivaji Bhosale
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
In JTable, when you click on a cell, ListSelectionEvent is raised,
for which valueChanged(ListSelectionEvent) is being executed.
I observed, after a click, valueChanged method getting excuted twice, is there any other way in API, by which we can have some function getting executed only for a single time ?
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Shivaji,
No, but you can use the method:
getValueIsAdjusting to make sure you only perform your function once.
if( !getValueIsAdjusting() )
{
// Do your stuff here.
}
Regards,
Manfred.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!