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!

hi i need some help with JTable.

Status
Not open for further replies.

vkarthik

Programmer
Aug 30, 2001
126
US
hi

i need some help with JTable. im extending an AbstractTableModel, and passing its instance to a JTable object. i dont know how to set the header row of the table. i have a string array with the header names, but how do i set it as the header. plz dont suggest the constructor
JTable(Object [][],String[]).

luv
Karthik.

LOL A ship is safe in the harbour, but that's not what it is meant for!!! LOL
 
You need to override the getColumnName(int col) method of the AbstractTableModel in your data model. The default implementation returns A, B, C, ....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top