Java Swing JLabel, HTML and custom fonts

前端 未结 2 1289
旧巷少年郎
旧巷少年郎 2021-02-10 02:46

In our Java Swing application, we\'re loading a custom font and adding it to a JLabel:

try {
  this.font = Font.createFont(Font.TRUETYPE_FONT, new F         


        
2条回答
  •  佛祖请我去吃肉
    2021-02-10 03:17

    Because StyledDocument extends Document, you may be able use an implementation thereof using JTextField's setDocument() method.

提交回复
热议问题