Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to sort a JTable straight before displaying it

 
Albert Robert
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to sort a JTable straight before displaying it

by one column
its value is 1,2,3,4 ........

whether this is the only way?

http://www.exampledepot.com/egs/javax.swing.table/SortCol.html

how to make it easier
 
Michael Dunn
Ranch Hand
Posts: 4632
  • 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
table.setAutoCreateRowSorter(true);
table.getRowSorter ().toggleSortOrder (0);

where '0' is the index of the column to be sorted
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic