【发布时间】:2015-01-24 15:07:12
【问题描述】:
我想在面板中添加多行标签。
jLabelTagInfo = new javax.swing.JLabel();
jLabelTagInfo.setText("Replace the tags <italic></italic> with <name content-type=\"names\"></name>");
但标签看起来像
它从面板中消失。
当我在其中使用 HTML 标签时,标签消失了:
jLabelTagInfo.setText("<html>Replace the tags <italic></italic> with <br><name content-type=\"names\"></name></html>");
如何转义标签以使其显示在JLabel中?
【问题讨论】:
标签: java html swing jlabel multiline