hyperlink in java

前端 未结 1 482
滥情空心
滥情空心 2021-01-22 18:34

Is there any method to create clickable hyperlink in JTextArea in Java?

相关标签:
1条回答
  • 2021-01-22 18:56

    One way you can do it if you absolutely want to use the jTextArea is to get the User MouseClick(x,y) location and then handle from there.

    However, the easier way out would be to use a JEditorPane. Maybe this link will help:

    http://www.apl.jhu.edu/~hall/java/Swing-Tutorial/Swing-Tutorial-JEditorPane.html

    Cheers!

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