Component com = null;
boolean edit = table.isEnabled() && model.isCellEditable(row, col);
if (edit)
{
TableCellEditor editor = table.getCellEditor(row, col);
com = table.prepareEditor(editor, row, col);
} else
{
TableCellRenderer renderer = table.getCellRenderer(row, col);
com = table.prepareRenderer(renderer, row, col);
com.setEnabled(false);