| Author |
why there's no header in my JTable
|
david hu
Ranch Hand
Joined: Jul 20, 2001
Posts: 143
|
|
I use these following code to initialize the JTable(of course, there are some other codes to setup the TableColumn objects). My problem is that the header of the table is not shown up? Can anyone give me some direction? I know that in the constractor of JTable, I can provide a parameter corresponding to the columns headers. But since I use default construct, if there any way to setup the header later? JTable contractorTable = new JTable(); ContractorTableData data = new ContractorTableData();//extends abstractTableModel contractorTable.setModel(data);
|
 |
S Perreault
Ranch Hand
Joined: Oct 29, 2003
Posts: 37
|
|
Did you add this method to your implementation of AbstractTableModel? /** Returns the column name for a particular column. */ public String getColumnName(int col) Perogi.
|
 |
 |
|
|
subject: why there's no header in my JTable
|
|
|