It is installed automatically in the table renderer and editor from the data in your DefaultTableModel. For example, for the table editor, the code:
public Component getTableCellEditorComponent( JTable table, Object value, boolean isSelected, int row, int column) { ... editButton.setText( value.toString() ); editButton.setIcon( null ); ... }
where value is the value from your table model. See ButtonColumn.java for more details.
EDIT: since you are adding 4 columns, you should probably change the row data to
model.addRow(new Object[]{"DATA1", "DATA2", "DATA3", "DELETE"});
to see the delete buttons in the 4th column.
source share