Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我可以org.jsoup.nodes.Document在窗口中显示 JSoup 吗?我正在做的是从中获取 HTML 代码Document doc = Jsoup.connect(URL).get();,我想doc在一个窗口中显示。我该怎么做呢?另外,如果可能的话,我能正确地设置它的样式吗?
org.jsoup.nodes.Document
Document doc = Jsoup.connect(URL).get();
doc
JSoup是用于此目的的错误 API。它用于将 HTML 内容解析为其文档元素。
JSoup
JEditorPane有一种setPage设置内容的方法,它也会为您提供页面样式:
JEditorPane
setPage
editorPane.setPage(new URL("http://www.mysite.com"));