How do you render HTML using Java?

徘徊边缘 提交于 2019-12-24 11:53:41

问题


I am working on building a web browser in Java. I have used a parser (JTIDY) to parse the HTML page into a DOM document. I know that rendering means the graphical representation of DOM document. But I don't know what the engineering process is for HTML rendering in Java. In Java there is a JEditorkit to parse and render, but it is not well-formed. So I want a better solution.

My question is: what is the actual process of HTML rendering and showing the complete web page in Java?


回答1:


You can try either the Cobra renderer & parser or Flying Saucer project.




回答2:


There is the pretty much vaporware JWebPane that is part of JavaFX, but who knows when and if that will ever come out.

You can use MozSwing which integrates the Mozilla rendering framework with the Java Swing toolkit.



来源:https://stackoverflow.com/questions/4242757/how-do-you-render-html-using-java

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!