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?
Font f = new Font("serif", Font. PLAIN, fontSize); The fontSize parameter will determine the size of your Font . You can't actually change the size of an existing Font object.
To increase the font size, press Ctrl + ] . (Press and hold the Ctrl , then press the right bracket key.) To decrease the font size, press Ctrl + [ . (Press and hold the Ctrl , then press the left bracket key.)
table.setFont(new Font("Serif", Font.BOLD, 20));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With