Last active
April 22, 2017 16:11
-
-
Save liketaurus/7df26b81b4f1890ab70b6f632d048d9b to your computer and use it in GitHub Desktop.
How open specified URL from Java code (fragment of Netbeans plugin code)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ... | |
@Override | |
public void actionPerformed(ActionEvent e) { | |
// TODO implement action body | |
try { | |
URLDisplayer.getDefault().showURL(new URL("http://productivityblog.com.ua")); | |
} catch (MalformedURLException ex) { | |
JOptionPane.showMessageDialog(null, "Can't open an URL: " + ex.getMessage()); | |
} | |
} | |
// ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment