editorPane.setContentType("text/html");
                  scrollPane.setViewportView(textPane);   
File file=new File("课件\\第一章  线性规划引论\\线性规划问题及其数学模型.html");
String str=file.getAbsolutePath();
str="file:"+str;
try {
editorPane.setPage(str); } catch (IOException e) {
System.out.println("读取页面 " + str + " 出错. " + e.getMessage());
}
部分代码如上,文件路径没有错误,不知道为什么文件中的图片现实不出来?
请帮忙看下,或者给些其它JTextPane显示HTML文件的代码,谢谢!