File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes jtable, defaulttable model Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "jtable, defaulttable model" Watch "jtable, defaulttable model" New topic

jtable, defaulttable model

joseph dela cruz
Ranch Hand

Joined: May 17, 2012
Posts: 38

hello guys how can i remove column in JTable?

i have already made a button that when triggered it will add column through

DefaultTableModel tbl = new DefaultTableModer():


now what im trying to do is make a column vanish T T and im surprised i did not see a removeColumn method xD is there anyway i can remove columns through runtime?

and if JTable.remove(component) is the answer how? how can i use it xD
Darryl Burke

Joined: May 03, 2008
Posts: 5115

Remove the column from the TableColumnModel.

luck, db
There are no new questions, but there may be new answers.
I agree. Here's the link:
subject: jtable, defaulttable model
It's not a secret anymore!