Links to a webpage either in the same window or in a new window. The complete URL must be specified. Advanced Link to an external page without all the muss. When run with an applet, uses the browser to open the url, for applications, attempts to launch a browser with the url. @param u
(String url)
| 3434 | * @param url the complete URL, as a String in quotes |
| 3435 | */ |
| 3436 | public void link(String url) { |
| 3437 | try { |
| 3438 | if (Desktop.isDesktopSupported()) { |
| 3439 | Desktop.getDesktop().browse(new URI(url)); |
| 3440 | } else { |
| 3441 | // Just pass it off to open() and hope for the best |
| 3442 | launch(url); |
| 3443 | } |
| 3444 | } catch (IOException e) { |
| 3445 | printStackTrace(e); |
| 3446 | } catch (URISyntaxException e) { |
| 3447 | printStackTrace(e); |
| 3448 | } |
| 3449 | } |
| 3450 | |
| 3451 | |
| 3452 | static String openLauncher; |
nothing calls this directly
no test coverage detected