• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Displaying a HTML file from a local file system(relative path) using JEditorPane?

 
ShankarS
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
The setPage() method of the JEditorPane takes an URL to display page using the HTTP protocol. I want to display a html page from my local file system.
Thanx. in Adavace,
Shankar S
 
veron luis
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try
htmlPane.setPage(url);

where :
url is an object of type URL..

There is a good example in the Java tutorial available at www.java.sun.com

luis
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic