aspose file tools
The moose likes Swing / AWT / SWT and the fly likes JTable particular info needed Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "JTable particular info needed" Watch "JTable particular info needed" New topic
Author

JTable particular info needed

Shivaji Bhosale
Ranch Hand

Joined: Mar 12, 2001
Posts: 70
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

Joined: Jan 09, 2001
Posts: 1492
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JTable particular info needed
 
Similar Threads
JTable + Activating EditMode by cursorkeys
JTable switching
JTable and it's selection listeners
Returning row position in a JTable
jtable