I have Java Desktop application that displays some information in a JTable
that contains URL + text
in the each cell. As I am facing difficulties to show and open URL in cell so I am planning to show the content of cell in JEditorpane
. User can open the content of cell in JEditorpane
where user can easily see and edit the content.
Again how can I make only the URL click-able and allow the user to open URL in a default browser in JEditorpane
.
Please note:
JEditorpane
pane will contain both text and URL so I need to make only URL click-able. JEditorpane
is editable. User can edit the content. HyperlinkListener
. E.G. in JavaDocs for JEditorPane
.text/html
, and is not editable.Desktop.browse(URI)
to the URL.