I am trying to use a JTable with dynamic addition/removal
of columns per user request. The problem is, if I remove
some columns either by JTable or DefaultTableColumnModel
removeColumn() call, the next time I add a new one, the
removed ones reappear! The documentation page at
says it explicitly:
Removes aColumn from the JTable's array of columns.
Note: this method does not remove the column of data
from the model it just removes the TableColumn
that was displaying it.
So, what can I do if I *REALY* want to remove a column
not just hide it? Is there any way?
Also, if a column is hidden by the so called 'remove'
calls, how can I show them again or control their state,
i.e. hidden/shown?
Thanks for any help in advance!
Zsolt
I have submitted an RFE on this.
Steve
Charles Ballance wrote in message <3675CE6E...@webforged.com>...
Actually removeColumn on the TableColumnModel will remove the specified column from the column model which is the table view but it will
still be there in the Table Model which is the table data.
Hence to remove column from just the view and add other columns..
first remove column on the tablecolumnmodel
then add columns to the table from the table model.
i hope this helps.
Sona