change label font size java code example
Example 1: how to change font size in JLabel
label = new JLabel("A label");
label.setFont(new Font("Serif", Font.PLAIN, 14));
Example 2: change font size java swing
// make sure the new size is a float, not an int (add f at the end of the number)
label.setFont(label.getFont().deriveFont(newSize));