Clear all content in a table

i have a table which has a lot of data in it, is there anyway to clear all the values in all the cells at once?
[118 byte] By [ThierryHenrya] at [2007-11-27 2:18:14]
# 1
Yep, reset the tableModel.
PhHeina at 2007-7-12 2:17:32 > top of Java-index,Desktop,Core GUI APIs...
# 2
how would i wriet the code rof that...i looked in the api but ant find any method that implements this functionwould i just write table.reset();
ThierryHenrya at 2007-7-12 2:17:32 > top of Java-index,Desktop,Core GUI APIs...
# 3
Take a look at http://forum.java.sun.com/thread.jspa?threadID=421960&messageID=1873874 http://www.jguru.com/faq/view.jsp?EID=568834 http://forum.java.sun.com/thread.jspa?threadID=651795&messageID=3832681Satanduvel
Satanduvela at 2007-7-12 2:17:32 > top of Java-index,Desktop,Core GUI APIs...
# 4
hithis is the method i followed..table.setValueAt(" ",row,colum);is that enough
deepak_cuceka at 2007-7-12 2:17:32 > top of Java-index,Desktop,Core GUI APIs...
# 5
> hi> this is the method i followed..> > table.setValueAt(" ",row,colum);> is that enoughGood luck for doing that in a table of 20 columns and 3000 rows :P
PhHeina at 2007-7-12 2:17:32 > top of Java-index,Desktop,Core GUI APIs...
# 6
If you are using a DefaultTableModel (or a table model that extends it) thenmodel.setRowCount(0); works just fine.
cimmerian76a at 2007-7-12 2:17:32 > top of Java-index,Desktop,Core GUI APIs...