public class BrowserHelper extends Object
openURL
method is based on
Bare Bones Browser Launch,
which is placed in the public domain.Modifier and Type | Field and Description |
---|---|
static String[] |
LINUX_BROWSERS
Linux/Unix binaries to look for
|
Constructor and Description |
---|
BrowserHelper() |
Modifier and Type | Method and Description |
---|---|
static JLabel |
createLink(String url,
String text)
Generates a label with a clickable link.
|
static void |
openURL(Component parent,
String url)
opens the URL in a browser.
|
static void |
openURL(Component parent,
String url,
boolean showDialog)
opens the URL in a browser.
|
static void |
openURL(String url)
opens the URL in a browser.
|
public static final String[] LINUX_BROWSERS
public static void openURL(String url)
url
- the URL to openpublic static void openURL(Component parent, String url)
parent
- the parent componenturl
- the URL to openpublic static void openURL(Component parent, String url, boolean showDialog)
parent
- the parent componenturl
- the URL to openshowDialog
- whether to display a dialog in case of an error or
just print the error to the consoleCopyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.