Package java.awt

Examples of java.awt.Desktop.browse()


        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
              Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null;
                if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE)) {
                    try {
                        desktop.browse(Cody.getInstancia().getLinkAjuda());
                    } 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

       if( !desktop.isSupported( java.awt.Desktop.Action.BROWSE ) ) {
         progress("Could not open "+url+"\n");
       }
       try {
         java.net.URI uri = new java.net.URI( url );
         desktop.browse( uri );
       }catch ( Exception e ) {
           System.err.println( e.getMessage() );
       }
     }
 
View Full Code Here

       if( !desktop.isSupported( java.awt.Desktop.Action.BROWSE ) ) {
         progress("Could not open "+url+"\n");
       }
       try {
         java.net.URI uri = new java.net.URI( url );
         desktop.browse( uri );
       }catch ( Exception e ) {
           System.err.println( e.getMessage() );
       }
     }
 
View Full Code Here

       if( !desktop.isSupported( java.awt.Desktop.Action.BROWSE ) ) {
         progress("Could not open "+url+"\n");
       }
       try {
         java.net.URI uri = new java.net.URI( url );
         desktop.browse( uri );
       }catch ( Exception e ) {
           System.err.println( e.getMessage() );
       }
     }
 
View Full Code Here

       if( !desktop.isSupported( java.awt.Desktop.Action.BROWSE ) ) {
         progress("Could not open "+url+"\n");
       }
       try {
         java.net.URI uri = new java.net.URI( url );
         desktop.browse( uri );
       }catch ( Exception e ) {
           System.err.println( e.getMessage() );
       }
     }
 
View Full Code Here

    helpLabel.addMouseListener(new MouseAdapter() {
      @Override
      public void mouseClicked(MouseEvent arg0) {
        try {
          Desktop d = Desktop.getDesktop();
          d.browse(new URI("https://docs.google.com/document/d/1URv0ozD0kBYfDm3SmbY8_ceiXnIe_ofBzWlC_pQQ08c/pub"));
        } catch (Exception ignored) { }
      }
    });
    helpLabel.setIcon(new ImageIcon(MafiaView.class.getResource("/javax/swing/plaf/metal/icons/ocean/question.png")));
View Full Code Here

      @Override
      public void mouseClicked(MouseEvent arg0) {
        try {
          if (!canSpecifyThread) {
            Desktop d = Desktop.getDesktop();
            d.browse(new URI(urlField.getText()));
          }
        } catch (Exception ignored) { }
      }
    });
    urlField.setFont(new Font("Palatino Linotype", Font.PLAIN, 12));
View Full Code Here

         
          //TODO: write a better client for the shop.... will probably be a pain
          Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null;
            if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE)) {
                try {
                    desktop.browse(new URI(url));
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        } catch (InterruptedException | ExecutionException e) {
View Full Code Here

                    String link = XML.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

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.