Java – How to change the font size for strings in a JTable

fontsjavajtableswingtablecellrenderer

String columnNames[] = {"Time","MAP","ICP","CPP"};
String dataValues[][]= new String [countery]

table = new JTable( dataValues, columnNames );

I am working on a table and storing string values in dataValues. I am curious to know if there is anyway to increase the font size from the default size (which is I assume regular 11 font). This brings my other question…even font color?

Best Solution

table.setFont(new Font("Serif", Font.BOLD, 20));