我正在用 Java 创建一个 Web 浏览器。在这个浏览器中,我将 JEditorPane 用于浏览器窗口。我正在使用“setPage(String url)”方法来显示页面。浏览器可以显示该页面,但存在一些问题,如前所述:
- 浏览器不显示 java 脚本。
- 它不显示小程序。
- 浏览数据没有以正确的方式显示(例如作为浏览器(在图像中显示
))。
我的代码是-
JEditorPane editorPane = new JEditorPane();
String url="http://google.co.in";
editorPane.setEditable(false);
try {
editorPane.setPage(url);
} catch (IOException e) {
System.err.println("Attempted to read a bad URL: " + url);
}
}