Ho risolto così facendo:
codice:
public void hyperlinkUpdate(HyperlinkEvent e) {
if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
if (!Desktop.isDesktopSupported() || !Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) {
JOptionPane.showMessageDialog(null,"Impossibile aprire il link!\nAzione non supportata!");
return;
}
try {
Desktop.getDesktop().browse(e.getURL().toURI());
} catch (Exception e1) {
JOptionPane.showMessageDialog(
null,
"Impossibile aprire il link!\n"
+ e1.getMessage());
}
}
}