[英]JLabel multiline with escape for HTML tags to display
我想在面板中添加多行標簽。
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
?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.