A
A
Andrey Frolov2015-02-28 14:25:37
Java
Andrey Frolov, 2015-02-28 14:25:37

How to clear jtable completely?

I am displaying the result of a query in a jTable using the DefaultTableModel, but after that I need to completely clear the jTable and output the result of a completely different query into it, which will have a different number of columns and their contents. So, how do you do this cleanup?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Evgeny Kornachev, 2015-04-12
@inham

What if you just set a new model to the table?

A
Alexander, 2015-03-01
Obiedkov @aobiedkov

stackoverflow.com/questions/4577792/how-to-clear-jtable

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question