C
cl
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
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