Change font of JLabel
问题 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 回答1: I didn't see papyrus in my available fonts. How can I add it? Look in the Font methods for the createFont() variants. 来源: https://stackoverflow.com/questions/7859551/change-font-of-jlabel