I have Java Desktop application that displays some information in a JTable
that may contain URLs with some text in some cells. How can I make only the URL click-able and allow the user to open it in a default browser if he/she clicks on it.
相关问题
- Views base64 encoded blob in HTML with PHP
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
here is a sample about displaying text as hyperlink: HyperLink in JTable Cell
You can use the approach shown here in a custom
TableCellEditor
. Once selected, you canbrowse()
the URI.Addendum: You can use
JEditorPane
for your editor component andaddHyperlinkListener()
to listen for events related to the link.