Hi,everybody
as the title, I need the tableheader to be editable, and i rewrited the
CellEditor for the tableheader,
the code is as follows:
tableColumn.setCellEditor(new TableHeadEditor());
private class TableHeadEditor extends AbstractCellEditor implements
TableCellEditor{
JTextField jTextField = new JTextField("????");
public Component getTableCellEditorComponent(JTable table,
Object value, boolean isSelected, int row, int column) {
jTextField.setEditable(true);
return jTextField;
}
public Object getCellEditorValue() {
return null;
}
}
but it can't work at all,
is there somting wrong?
regards,
PoorRichard
IchBin - 13 Feb 2006 16:07 GMT
> Hi,everybody
>
[quoted text clipped - 21 lines]
> regards,
> PoorRichard
Take a look at this solution:
http://www.objects.com.au/java/examples/swing/EditableTableHeader.do
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)