This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
If u r using DefaulttableModel then check API to delete column.Else modify the tablemodel u created to delete column, generally by removing the column information from vectors used to hold column info. .Set this new model as table model for the table.Generally table.setModel(new TableModel()) will refresh the view to show new table configuration. [ February 04, 2004: Message edited by: Kiran More ]
Joined: Aug 24, 2003
Yup I would like to popup a dialog by pressing a button for user to choosing a column to be deleted. My TableModel is simple: I have a TreeSet that storing data. Then,
Then, with some codes convert the data from the set to the above array. Then, instaniate a DefaultTableModel with the above array as arguments:
I have already used a showInputDialog to get a String that representing the column header from user. And then, locate the relevant TableColumn. But I don't know how to remove the column from the TableModel. Could you give me some hints? Tell me if you need more details. Thanks Regards Anthony Yip