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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hiding a JTABLE column

Status
Not open for further replies.

Baseballlover

Instructor
Nov 5, 2001
1
US
I am trying to hide one of the columns on a Jtable. I am using the DefaultTableCellRenderer class and the setVisible method. The code compiles, but nothing happens. I am able to set Tool Tip text, but I am not able to made the column invisible. Below is the code I use. Any help would be appreciated.

renderer1.setToolTipText("Help");
renderer1.setVisible(false);
tQQV1.getColumnModel().getColumn(2).setCellRenderer(renderer1);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top