Hyperlink in JTextField
Is there some way to display text as hyperlink in JTextField so that when u开发者_开发问答ser presses it opens the link in a browser
You can't do that. Instead you want to use a JEditorPane:
http://download.oracle.com/javase/tutorial/uiswing/components/editorpane.html
Technically, you can override some methods of JTextField, like onClick(..), so you can check what you clicked at and if it starts with "www" or "http", open default web browser with that link as a parameter. But try to look at other text components, probably there will be some that can open link "by default".
精彩评论