6

how to change Font of JLabel ? I try this but with no succes:

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

Just size is changed but Font is still same

mKorbel
  • 109,525
  • 20
  • 134
  • 319
hudi
  • 15,555
  • 47
  • 142
  • 246

1 Answers1

5

I didn't see papyrus in my available fonts. How can I add it?

Look in the Font methods for the createFont() variants.

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433