Change JLabel Font

How to change the font of JLabel? I try this, but have not succeeded:

JLabel nadpis = new JLabel(); nadpis.setFont(new Font("Papyrus", Font.ITALIC, 100)); nadpis.setText("hi"); 

Only the size is changed, but the font is still the same

+6
source share
1 answer

I have not seen papyrus in my available fonts. How to add it?

See the Font methods for createFont() options.

+4
source

Source: https://habr.com/ru/post/899862/


All Articles