How to use HTML and CSS as a Java application GUI?

后端 未结 6 1297
孤城傲影
孤城傲影 2020-11-30 04:01

I want to design new Git client with a clean GUI.

Is it possible to use the power of HTML, CSS and JavaScript in a java application?

I would like to use Java

6条回答
  •  感情败类
    2020-11-30 04:40

    You can bring in the power of HTML,CSS,JavaScript into your Swing app using JFXPanel to embed JavaFX WebView. Have a look at the SimpleSwingBrowser demo in this link:https://docs.oracle.com/javase/8/javafx/interoperability-tutorial/swing-fx-interoperability.htm

    WebView allows to call JavaScript functions from Java and vice versa. It is also a nice way to enhance your legacy Java app with web technologies.

提交回复
热议问题