Would I be able to display a JSoup org.jsoup.nodes.Document
in a window. What I'm doing is taking HTML code from Document doc = Jsoup.connect(URL).get();
and I want to display doc
in a window. How would I go about doing this? Also if it is possible, would I be able to style it correctly?
JSoup
is the wrong API for this purpose. It is used to parse HTML content into its document elements.
JEditorPane
has a setPage
method for setting content which will also give you the styling for the page:
editorPane.setPage(new URL("http://www.mysite.com"));
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.