do you know the best way to erase whole JT ?
It depends on your model. If you can access it, modify its content, else :
yourJTable.setModel(new DefaultTableModel());
Don't do it like HEBERT suggested, you break the link between your data object and your table model. Bad MVC design.
Ideally, you have access to the data model. Assuming it's a List in the variable myDataList
myDataList.clear();
myTable.getModel().fireTableDataChanged();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With