swing组件中有否解析HTML语言的 大多数基于Swing的组件都可以JEditorPane是具有更强交互性和更加完整的HTML组件。调用其setPage 方法就可以自动显示html内容。速度不慢呀。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 如果要解析HTML的话,可以用HTMLEditorKit组建,这是java内建的html文本解析器 对!JEditorPane就可以,速度不慢 恩,JEditorPane用过的还不错,只不过有些页面的特效支持不好 JEditorPane是最好的选择具体可以参看Javax.swing.text包给个简单的例子: try { String url = "http://java.sun.com"; JEditorPane editorPane = new JEditorPane(url); editorPane.setEditable(false); JFrame frame = new JFrame(); frame.getContentPane().add(editorPane, BorderLayout.CENTER); frame.setSize(width, height); frame.setVisible(true); } catch (IOException e) { } UP,没错..JEditorPane是最好选择了吧?好像就它比较...好.用于解析HTML java提供的demo里面就有相关的源代码 swing 求指导 java String 插入Oracle 超长 求一个提取小括号的正则表达式 有关异常。。 求救! 如何取得当前机器得分区情况 如果读取一个目录的目录名 请教一个Swing的输出修改方案.. 帮忙!!!! 请问:如何通过Applet浏览服务器端的文件和目录? 如何将区位代码还原为汉字? JavaDocs是什么?
JEditorPane就可以,速度不慢
具体可以参看Javax.swing.text包
给个简单的例子:
try {
String url = "http://java.sun.com";
JEditorPane editorPane = new JEditorPane(url);
editorPane.setEditable(false);
JFrame frame = new JFrame();
frame.getContentPane().add(editorPane, BorderLayout.CENTER);
frame.setSize(width, height);
frame.setVisible(true);
} catch (IOException e) {
}
没错..JEditorPane是最好选择了吧?好像就它比较...好.用于解析HTML