EarthWeb
Developer.com
Site
windows 2000
visual c++
java
visual basic
javascripts
recommend it
 
Book
thinking in java
 
Interact
forum
guest book
jobs
jokes
what's new

share code
 
Resource
add resource
modify resource
new resource
 

[Internet Jobs]
-----
Java by E-mail:

Get the weekly e-mail highlights on Java!
-----

-

Changing the label of a column header


Author: Zafir Anjum

To change the label of a column header use the following code. The code changes the label of the first column header.


table.getColumnModel().getColumn(0).setHeaderValue( "New Label" );
table.getTableHeader().repaint();

It's important to call repaint() otherwise the header label might not change until a later time.

Posted On: 9-Jan-1999

internet.commerce