java gui set font size code example
Example: 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));
// 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));