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,107
  • 18
  • 130
  • 305
hudi
  • 14,603
  • 43
  • 135
  • 237

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
  • 166,747
  • 40
  • 210
  • 420