Package java.awt

Examples of java.awt.Desktop.browse()


            AbstractAction openBrowserAction = new AbstractAction("Show in browser") {
                @Override
                public void actionPerformed(ActionEvent event) {
                    try {
                        desktop.browse(reportFile.getAbsoluteFile().toURI());
                    } catch (IOException e) {
                        throw new IllegalStateException("Failed showing reportFile (" + reportFile
                                + ") in browser.", e);
                    }
                    finishDialog();
View Full Code Here


            final Desktop desktop = Desktop.getDesktop();
            if (desktop.isSupported(Desktop.Action.BROWSE))
            {
               try
               {
                  desktop.browse(new java.net.URI(url));
               }
               catch (Exception e)
               {
                  e.printStackTrace();
               }
View Full Code Here

            @Override
            public void buttonPressed(Button button) {
                Desktop desktop = Desktop.getDesktop();

                try {
                    desktop.browse(new URL(YAHOO_FINANCE_HOME).toURI());
                } catch(MalformedURLException exception) {
                    throw new RuntimeException(exception);
                } catch(URISyntaxException exception) {
                    throw new RuntimeException(exception);
                } catch(IOException exception) {
View Full Code Here

                ActionListener adminBrowserListener = new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        try {
                            URI uri = new URI(uriString);
                            desktop.browse(uri);

                        } catch (IOException e1) {
                            log.error("SYSTRAY: could not access system browser, access to "+label+" disabled");
                        } catch (URISyntaxException e1) {
                            log.error("SYSTRAY: could not build URI to administration service, access to "+label+" disabled");
View Full Code Here

            tmpFile.deleteOnExit();
            FileWriter fileWriter = new FileWriter(tmpFile);
            fileWriter.write(samlMessage);
            fileWriter.flush();
            fileWriter.close();
            desktop.browse(tmpFile.toURI());
        } catch (IOException ioe) {
            _logger.warning("Error writing SAML message to file: " + ioe);
        }
    }
}
View Full Code Here

         }
         if (args.length == 2 && (args[0].equalsIgnoreCase("help") || args[0].equalsIgnoreCase("/help")) && args[1].equalsIgnoreCase("roll")) {
            if (Desktop.isDesktopSupported()) {
               Desktop d = Desktop.getDesktop();
               try {
                  d.browse( new URI("http://www.youtube.com/watch?v=oHg5SJYRHA0") );
               } catch (Exception e) {
                  e.printStackTrace();
               }
            }
         }
View Full Code Here

 
  public static void openWebSite(String url) throws IOException{
    if(!Desktop.isDesktopSupported()) return;
    Desktop desktop = Desktop.getDesktop();
    if(!desktop.isSupported(Desktop.Action.BROWSE))return;
    desktop.browse(URI.create(url));
  }
}
View Full Code Here

  }

  private void launchBrowser() {
    try {
      Desktop deskTop = Desktop.getDesktop();
      deskTop.browse(new URI(rb.getString("help.url")));
    } catch (Exception ex) {
      Dialogs.showError(rb.getString("error.title"), ex.getMessage());
    }

  }
View Full Code Here

  public static void openInBrowser(String url) {
    try {
      java.net.URI uri = new java.net.URI(url);
      Desktop desktop = Desktop.getDesktop();
      desktop.browse(uri);
    } catch (IOException e) {
      e.printStackTrace();
    } catch (URISyntaxException e) {
      e.printStackTrace();
    }
View Full Code Here

        if (Desktop.isDesktopSupported()) {
            Logger.getLogger(App.class.getName()).log(Level.INFO, "Getting Desktop");
            desktop = Desktop.getDesktop();
            try {
                Logger.getLogger(App.class.getName()).log(Level.INFO, "Browse Command");
                desktop.browse(dest.toURI());
                Logger.getLogger(App.class.getName()).log(Level.INFO, "showURl Complete");
            } catch (Exception ex) {
                JOptionPane.showMessageDialog(null,
                "Exception: " + ex.getMessage());
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.