I'm trying to change my JLabel text size using this code:
my_font = my_label.getFont();
my_font = my_font.deriveFont(
Collections.singletonMap(
TextAttribute.SIZE, TextAttribute.20));
There is a compiler warning on this line:
TextAttribute.20;
This code works perfectly and changes the text weight:
font_bold = numero_fattura.getFont();
font_bold = font_bold.deriveFont(
Collections.singletonMap(
TextAttribute.WEIGHT, TextAttribute.WEIGHT_BOLD));
Question: How do I use the same code to change the text size?