如何将HTML放入Java中的JLabel中? [英] How do I put html in a JLabel in java?
本文介绍了如何将HTML放入Java中的JLabel中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在java中的JLabel中使用html标签?
How do I use html tags in a JLabel in java?
推荐答案
要将html放入 JLabel
,你会看起来像这样
To put html in a JLabel
, you would make it look something like this
JLabel label = new JLabel("<html><yourTagHere><yourOtherTagHere>this is your text</yourOtherTagHere></yourTagHere></html>");
这篇关于如何将HTML放入Java中的JLabel中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文