no you got a small collum with a ...
Main Topics
Browse All TopicsI want to hide a specific collumn in a JTable how to do this ?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
There are a number of ways to do it. It depends on if you want to do with via the view or model.
- You can remove the TableColumn from the TableColumnModel. See JTable.getColumnModel() and TableColumnModel.removeCol
- You can manipulate the model's getValueAt() and getColumnCount() methods to only display the columns you want. For instance:
//data stored as array in TableModel
String[][] data = {{"row0col0","row0col1","r
{"row1col0","row1col1","ro
boolean blockColumn1 = true;
public void getColumnCount() {
return (blockColumn1) ? data[0].length-2 : data[0].length-1;
}
public void getRowCount() {
return data.length;
}
public Object getValueAt(int row,int col) {
if (blockColumn1) return data[row][col-1];
else data[row][col];
}
hi,
i u don't want to change the table model,
u just have to set the size of the invisible column and it's header to zero:
...
int iColumn = < the invisible column >;
// set column width
table.getColumnModel().get
table.getColumnModel().get
// set column header width (to avoid the ... sign)
table.getTableHeader().get
table.getTableHeader().get
...
Note that "table" is the reference to your table object (if u use this code inside your table class replace "table" with "this").
-gkern
Business Accounts
Answer for Membership
by: kennethxuPosted on 2002-11-09 at 13:33:39ID: 7429172
you can probably set column with to 0.