This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • 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
  • 0
  • 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
  • 0
  • 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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic