Package java.awt

Examples of java.awt.Desktop.browse()


   
    if (!launched) {
      Desktop desktop = getDesktop();
          if (desktop != null) {
              try {
                desktop.browse(url.toURI());
                launched = true;
              } catch (Exception exp) {
                logger.debug("Could not launch URL using the Dekstop class [" + url + "]", exp);
               
                if (!Utilities.isEmpty(browserPath))
View Full Code Here


    public void actionPerformed(ActionEvent ev) {
        /*if (Desktop.isDesktopSupported()) {*/
            Desktop desktop = Desktop.getDesktop();
            /*if (desktop.isSupported(Desktop.Action.BROWSE)) {*/
                try {
                    desktop.browse(new URI("http://gephi.org/users/support/"));
                } catch (Exception ex) {
                    Exceptions.printStackTrace(ex);
                }
            /*}
        }*/
 
View Full Code Here

   */
  public static void openURL(final URL url) throws Exception {
    final Desktop desktop = Desktop.isDesktopSupported() ? Desktop
        .getDesktop() : null;
    if ((desktop != null) && desktop.isSupported(Desktop.Action.BROWSE)) {
      desktop.browse(url.toURI());
    } else {
      final OperatingSystem system = Utils.getPlatform();
      switch (system) {
      case MAC:
        Class.forName("com.apple.eio.FileManager")
View Full Code Here

   */
  public static void openURL(final URL url) throws Exception {
    final Desktop desktop = Desktop.isDesktopSupported() ? Desktop
        .getDesktop() : null;
    if ((desktop != null) && desktop.isSupported(Desktop.Action.BROWSE)) {
      desktop.browse(url.toURI());
    } else {
      final OperatingSystem system = Utils.getPlatform();
      switch (system) {
      case MAC:
        Class.forName("com.apple.eio.FileManager")
View Full Code Here

                           
                ligne = ligne.substring(4, ligne.length());
                //System.out.println(ligne);
                Desktop Bureau = Desktop.getDesktop();
                URI url = new URI(ligne);
                                Bureau.browse(url);
        }
                }
               
                br.close();
        }              
View Full Code Here

    {
      Desktop desktop = Desktop.getDesktop();

      if(desktop.isSupported(Desktop.Action.BROWSE))
      {
        desktop.browse(authUrl);
      }
      else
      {
        JOptionPane.showMessageDialog(null, "Visit the following URL: " + authUrl);
      }
View Full Code Here

          {
            Desktop desktop = Desktop.getDesktop();

            if(desktop.isSupported(Desktop.Action.BROWSE))
            {
              desktop.browse(websiteUri);
            }
            else
            {
              JOptionPane.showMessageDialog(null, websiteUrl);
            }
View Full Code Here

                    String link = XMLSerializer.getText(itemElement, "link");
                    Desktop desktop = Desktop.getDesktop();

                    try {
                        desktop.browse(new URL(link).toURI());
                    } catch(MalformedURLException exception) {
                        throw new RuntimeException(exception);
                    } catch(URISyntaxException exception) {
                        throw new RuntimeException(exception);
                    } catch(IOException exception) {
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

            url = new URL(urlStr);
            java.net.URL helpURL = ResourceAccessor
                .getHelpHTMLResource();
            if (desktop.isSupported(Desktop.Action.BROWSE)) {
              try {
                desktop.browse(url.toURI());
              } catch (IOException e) {
                MessageBox.showErrorDialog("VStar Help",
                    "Error reading from '"
                        + helpURL.toString() + "'");
              } catch (URISyntaxException e) {
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.