有一小段html代码,存在一个字符串中,我想用一个swing组件显示出来,这个功能如何实现呢?有现成的swing组件吗?
解决方案 »
- Java中Class<T>与Class<?>之间有何区别
- java ListArray对象的语法不明白: new String[0]
- 如何获取SQLSERVER中数据类型为uniqueidentifier的栏位数据
- WordML插入图片问题
- 扫描网段上的web server的类型,Timeout,retry应该怎么用?用的是HttpURLConnection类
- 当在树的某个节点上单击右键时如何获取该节点?
- 高分求一Tcp/IpSocket例子或框架程序!
- 为什么spring要用接口类
- 请问哪位有蓝桥杯决赛的试题
- jbuild中如何实现一个提示窗体?
- Socket编程中的 流 该如何用?
- 程序调试问题Exception in thread "main" java.util.NoSuchElementException
$genInfoPane = new JEditorPane("text/html", "<html>");
$genInfoPane.setEditable(false);
LookAndFeelTweaks.htmlize($genInfoPane);
add(new JScrollPane($genInfoPane));直接用StringBuffer或者StringBuilder写噢
StringBuffer temp = new StringBuffer("");
temp.append("<html><body>");
temp.append("<b>XML Definition Version: </b>");
temp.append($data.getXMLDefinitionVersion().toString());
temp.append("<br>");
temp.append("</body></html>");
$genInfoPane.setText(temp.toString());