Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can you hide a column in a JTable

Status
Not open for further replies.
May 13, 2002
75
GB
Can you hide a column in a JTable

I looked at the API and there is a
Code:
removeColumn(TableColumn aColumn)
method, but i just want to hide it so that later it can be displayed again. Any ideas ?

If not then i'll have remove the column, and reload the data when i want to show it again. Alistair [monkey]
 
Your data should be in a table model so you won't have to reload it, the table on your screen is just a view of the data. You should be able to add/remove columns displayed. If you want them to stay on the screen you could set the column width to zero. Jeremy Nicholson, Director of a UK-based Java and Data Warehousing consultancy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top