This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Displaying a HTML file from a local file system(relative path)  using JEditorPane? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Displaying a HTML file from a local file system(relative path)  using JEditorPane? " Watch "Displaying a HTML file from a local file system(relative path)  using JEditorPane? " New topic
Author

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

ShankarS
Greenhorn

Joined: Jul 29, 2001
Posts: 25
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

Joined: Aug 16, 2001
Posts: 5
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
 
subject: Displaying a HTML file from a local file system(relative path) using JEditorPane?
 
Similar Threads
DISPLAY HTML AFTER LOADED
JEditorPane
HTML with JEditorPane
To display webpage in JEditorpane
JEditorPane problems