79562599

Date: 2025-04-08 16:37:23
Score: 0.5
Natty:
Report link

The simplest way is to use HTML. Swing components support basic html.

DefaultModel table_model = (DefaultTableModel) tblMyTable.getModel();
String cell = "<html><font color='red'>This is red</font></html>";
Object[] row = {cell,"Another cell"};
table_model.addRow(row); 
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: OSXMonk