开发者

Hyperlink in a JLabel [duplicate]

开发者 https://www.devze.com 2023-02-22 02:11 出处:网络
This question already has answers here: How to add hyperlink in开发者_高级运维 JLabel? (12 answers)
This question already has answers here: How to add hyperlink in开发者_高级运维 JLabel? (12 answers) Closed 7 years ago.

I have a JLabel in my about us form which I'd like to be a hyperlink to www.samteksystems.com, which means that whenever I click on that JLabel it should go to www.samteksystems.com. Please help me.


use HTML

 String str = "<a href=\"www.samteksystems.com\" >samteksystems</a>";
 jLabel.setText(str);
0

精彩评论

暂无评论...
验证码 换一张
取 消