All pastes #565712 Raw Edit

helpset path

public text v1 · immutable
·published 2007-06-14 03:24 UTC
rendered paste body
tarvid@venus:~/Savings2$ ls
about  build  build.xml  dist  doc  manifest.mf  nbproject  report  src
tarvid@venus:~/Savings2$ ls doc/about/hs
3e4e481b.html  809c97f9.html  main.hs  map.jhm  pics  toc.xml

    private void helpAboutMenuItemActionPerformed(java.awt.event.ActionEvent evt) {                                                  
        
        HelpSet hs;
        HelpBroker hb;
        String pathToHS = "doc/about/hs/main.hs";
        //Create a URL for the location of the help set
        try {
            URL hsURL = getClass().getClassLoader().getResource(pathToHS);
            hs = new HelpSet(null, hsURL);
        } catch (Exception ee) {
            // Print info to the console if there is an exception
            System.out.println( "HelpSet " + ee.getMessage());
            System.out.println("Help Set "+ pathToHS +" not found");
            return;
        }
        
        // Create a HelpBroker object for manipulating the help set
        hb = hs.createHelpBroker();
        //Display help set
        hb.setDisplayed(true);
        
        
    }