This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization 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
  • 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