to insert a hyperlink into an application you need something like this
//create the html pane
pane = new JEditorPane();
pane.setEditable(false);
//display the page within it
pane.setText(htmlContent);
//add a hyperlink listener to the pane
pane.addHyperlinkListener(new HyperlinkListener() {
public void hyperLinkUpdate(HyperlinkEvent e) {
//code that launches the default browser using link
}
}
however, thats the easy bit. im not sure how to do the system default browser. for a specific way you could do something like
Runtime.getRuntime().exec("iexplore " + e.getDescription())
hope it helps
Chris
whoops. also in it you need pane.setEditorKit(new HTMLEditorKit())
and if you only want the listener to respond on clicks youd also need in the listener
if(e.getEventType() == HyperlinkEvent.EventType.ACTIVATED)
{
//code
}