Forums Register Login

Resetting columns in JTable

+Pie Number of slices to send: Send
I have a JTable in a JScrollPane that is in a singleton class. Can anyone tell how to clear the data in the JTable each time the class is invoked? The table retains the column names that it had on the first call to the class.
Thanks,
Barry
+Pie Number of slices to send: Send
You'll need to do it via modifications in the table model. I believe, you are using some table model. We can help more if you can elaborate a bit more or post some code here.
HTH,
- Manish
+Pie Number of slices to send: Send
Another way is to call setHeaderValue() on every Column in the JTable.
He got surgery to replace his foot with a pig. He said it was because of this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 643 times.
Similar Threads
JTable
JTable
Jtable
JTable
JTable
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 06:50:30.