Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Sorting and inserting data in JTable  RSS feed

 
Shyamala Parvathy
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can i do the sorting the data in the JTable? How can i insert new row in the proper position in the sorted table ? I don't want to reintialise the JTable or the model
 
San Su
Ranch Hand
Posts: 313
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a table sorter example in sun site.. follow the
link..
http://java.sun.com/docs/books/tutorial/uiswing/components/table.html#sorting
It doesnt matter whether the table is sorted or not,
you can always use TableModel.insertRow() method to insert
a new row.
 
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!