How to use html tags in JTextArea

后端 未结 2 933
感情败类
感情败类 2021-02-14 07:50

When I try to change color of a JTextArea using

textArea.setText(\"  Hi \")
<
2条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-14 07:57

    JavaFX WebView is very powerful for rendering HTML and You can easily display javafx component(WebView) in your Swing Application by using JFXPanel. For tutorial of embedding fx in swing here is one from oracle: http://docs.oracle.com/javafx/2/swing/swing-fx-interoperability.htm

    Thanks

提交回复
热议问题