Home arrow static arrow Java Programming [Archive] - JTable.convertColumnIndexToView needed for a row
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - JTable.convertColumnIndexToView needed for a row
This topic has 2 replies on 1 page.

Posts:640
Registered: 5/22/02
JTable.convertColumnIndexToView needed for a row  
Jun 29, 2004 12:00 PM



 
I can use the method convertColumnIndexToView to determine if user moved around any columns. But if the user sorts the tables, the rows get jumbled. I can't seem to find a "convertRowIndexToView" method anywhere. Does one exists? If not, how would I go about finding the order of the data?

Thanks!
 

Posts:24,517
Registered: 98-02-27
Re: JTable.convertColumnIndexToView needed for a row  
Jun 29, 2004 12:48 PM (reply 1 of 2)



 
I can't seem to find a "convertRowIndexToView" method anywhere. Does one exists?

No. Sorting is not part of the JDK.

The Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/components/table.html#sorting]Using Tables[/url] has a sorting class to help you out. It has a public modelIndex(viewIndex) method which may help you out, or you may be able to extend the class to provide a viewIndex(...) method.
 

Posts:640
Registered: 5/22/02
Re: JTable.convertColumnIndexToView needed for a row  
Jun 29, 2004 2:17 PM (reply 2 of 2)



 
Thanks for the link, I'll check it out!
 
This topic has 2 replies on 1 page.