if (editorComponent instanceof JTextField) { ((JTextField)editorComponent).setText(value.toString()); delegate = new EditorDelegate(); ((JTextField)editorComponent).addActionListener(delegate); } else {  }
delegate.setValue(value);
  public Component getTableCellEditorComponent(JTable table, Object value,                                               boolean isSelected, int row,                                               int column)  {    // NOTE: as specified by Sun, we don't call new() everytime, we return     // editorComponent on each call to getTableCellEditorComponent or    // getTreeCellEditorComponent.  However, currently JTextFields have a    // problem with getting rid of old text, so without calling new() there    // are some strange results.  If you edit more than one cell in the table    // text from previously edited cells may unexpectedly show up in the     // cell you are currently editing.  This will be fixed automatically    // when JTextField is fixed.    if (editorComponent instanceof JTextField)      {        ((JTextField)editorComponent).setText(value.toString());        delegate = new EditorDelegate();        ((JTextField)editorComponent).addActionListener(delegate);      }    else      {        // TODO      }    return editorComponent;	} // getTableCellEditorComponent()