Using a JEditorPane to display a web page. import *; import *; import *; import *; public class. The JEditorPane class is the foundation for Swing’s styled text components and provides a mechanism Using an Editor Pane to Display Text From a URL. This class implements accessibility support for the JEditorPane class. Gets the current URL being displayed. getRef method for the URL being displayed).
|Published (Last):||27 January 2016|
|PDF File Size:||2.53 Mb|
|ePub File Size:||18.31 Mb|
|Price:||Free* [*Free Regsitration Required]|
Originally posted by Greg Whelan: My question is a slight variant on displaying an HTML page from disk The setPage method only supports URLs which does offer one means of achieving the desired functionality: I don’t know how to pass the path of the page in a heditorpane independent way. Everything I’ve tried just gives me an empty JEditorPane everytime. I figured it out. Here is the code which will load an HTML page into a editorpane when passed a html file on your hard drive: Could you please tell me how you define the String page here?
I tried to pass a path or a file name, but it always gives me an Invalid URL error.
It definitely works I am using it. Here is how I do it: Frank [This message has been edited by Frank Hale edited June 08, I tried in your way, but it still doesn’t work.
May I ask what ojbect you use to call showPage String method? Here is the complete code which I am using.
[JDK] Images are not scaled correctly in JEditorPane – Java Bug System
Here is the complete code: I got it at last. Glad I could help!
I faced the same problem using HTML. This worked fine with me. Open a Web Page inside a jDesktopPane.