Friday, October 26, 2012

Code used in video "Java prog#23.How to open any document e.g .pdf, .doc ,.png file from By a jbutton or jmanu NetBeans"

10:57 AM

Here I am providing the downloadable code link of  the java code I have used in the video
 "Java prog#23.How to open any document e.g .pdf, .doc ,.png file from By a jbutton or jmanu NetBeans"  of my YouTube channel ProgrammingKnowledge

Click Link to watch the video LINK

This code below is for the HelpActionPerformed method action perform


  private void HelpActionPerformed(java.awt.event.ActionEvent evt) {                                           
        
              try                                      //try statement
        {
                  Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler "+"C:\\Users\\FilePath\\Frequently Asked Questions.pdf");
                  
                  
        } catch (Exception e)                    //catch any exceptions here
       {
            JOptionPane.showMessageDialog(null,"Error");  //print the error
       }

        
        
        
    } 

Written by

We are one of the initiators of the development of information technology in understanding the need for a solution that is familiar and close to us.

0 comments:

Post a Comment

 

© 2013 Klick Dev. All rights resevered.

Back To Top