This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Customer Requirements for Developers and have Marcho Behler on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes Dynamic JTable Headers? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Reply locked New topic

Dynamic JTable Headers?

Gary Frick

Joined: Sep 13, 2002
Posts: 28
I'm trying to build a dynamic JTable to display the results of a SQL/JDBC Query. After I do the query I get the column names returned. But how do I create the table header dynamically using the resulting column names?
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
Please do not cross post. Respond to this post in Swing.

Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
It is sorta covered in the JavaRanch Style Guide.
subject: Dynamic JTable Headers?
It's not a secret anymore!