Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / January 2004

Tip: Looking for answers? Try searching our database.

JTable Column Header Names

Thread view: 
Dave Monroe - 15 Jan 2004 02:05 GMT
Hi,

I'm trying to dynamically change the column names on a JTable object.

I've tried getting the TableColumn object for a given column and used
the setIdentifier() method to change it, but nuttin' happens.

Any words of wisdom?

Thanks in advance.

Dave Monroe
ak - 15 Jan 2004 04:47 GMT
> I'm trying to dynamically change the column names on a JTable object.
>
> I've tried getting the TableColumn object for a given column and used
> the setIdentifier() method to change it, but nuttin' happens.
>
> Any words of wisdom?

did you read javadoc?
it says that "identifiers are not used by the JTable, they are purely a
convenience for the external tagging and location of columns."

setHeaderValue(Object o) is right one.

____________

http://reader.imagero.com the best java image reader.
Dave Monroe - 15 Jan 2004 15:58 GMT
> > I'm trying to dynamically change the column names on a JTable object.
> >
[quoted text clipped - 8 lines]
>
> setHeaderValue(Object o) is right one.

Thank you kindly.

For anyone else reading the thread, after you change the column header
values, you have to call the JFrame's repaint() method.

Dave


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.