Java - HTML5 alternative to JEditorPane

前端 未结 1 495
生来不讨喜
生来不讨喜 2020-12-18 03:45

I am trying to create a simple web browser for a project, but I am using JEditorPane to render and display HTML. I have heard that JEditorPane should not be used as a browse

相关标签:
1条回答
  • 2020-12-18 04:00

    You can use JavaFX-2 Webview. From the JavaFX-2 Adding HTML Content tutorial docs:

    The embedded browser component is based on WebKit, an open source web browser engine. It supports Cascading Style Sheets (CSS), JavaScript, Document Object Model (DOM), and HTML5.

    For integration of javafx-2 with swing I recommend you to read the Swing and Javafx-2 Interoperability article.

    I hope it helped. Cheers

    0 讨论(0)
提交回复
热议问题