This may be a vague query, so please pardon me.
Customized JTable (I\'ve modified the query and will discuss based on the SSCCE provided). I\'ve to create a JTable t
Override the getCellRenderer()
method to return an appropriate renderer. Something like:
@Override
public TableCellRenderer getCellRenderer(int row, int column)
{
int modelColumn = convertColumnIndexToView(column);
if (modelColumn == 0 && getValueAt(row, column).equals(""))
return getDefaultRenderer(String.class);
else
return super.getCellRenderer(row, column);
}
You would also need to change the data in the model:
{"", "File", ""},
Finally you would also override the isCellEditable()
method to make the empty cell non editable.
Then you can just use the default Boolean renderer/editor for the other rows in the column.