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:
JEditorpanepane will contain both text and URL so I need to make only URL click-able.- The
JEditorpaneis editable. User can edit the content.
HyperlinkListener. E.G. in JavaDocs forJEditorPane.text/html, and is not editable.Desktop.browse(URI)to the URL.