To make an application feel complete and to add support for the user you should always add a help system to your application.
For this reason, Sun® offers the JavaHelp system which isn't too easy to use and does not look very attractive to the user.
By using the library offered here, you will be able to add an attractive Windows® Vista® style help system to your application
in no time!
The library
Everything you need to add a help system to your application is offered by the attached library jar file. All you need to do is add it to the classpath of your project.
The main features of the library:
- library is easy to use and very small in size (~60 kB)
- search function
- user can change text size for better readability
- pages can be printed out
- you create the contents by writing simple HTML files
Creating the contents
You decide what the contents of your help will be. Using any kind of HTML editor you simply have to write the HTML files. You will need at least an index page (for example 'index.htm'), one page for the table of contents (must be named 'toc.html') and one page which is reached through the 'Ask' button (must be named 'ask.html').
While creating the HTML pages you don't need to worry about formatting since the pages will automatically be CSS formatted in the viewer component. The following screenshot shows an example for a help page:
<title>Was sind Updates</title> </head> <h1>Was sind Updates?</h1> <p>Updates sind aktualisierte oder ergänzende Softwareversionen, durch die Probleme verhindert oder behoben bzw. die Sicherheit oder Leistungsfähigkeit des Computers verbessert werden kann. Es wird dringend empfohlen, die Funktion für automatische Updates zu aktivieren, damit Sicherheitsupdates und andere wichtige bzw. empfohlene Updates für den Computer herunterladen werden können, sobald diese verfügbar sind.</p> <b>Siehe auch:</b> </ul> </body> </html>
Adding the help system to your application
The following code snippet shows how to open the help viewer component from within your application:
The result
// The absolute path to the index file of your help must be given "help" + "index.html"; // Create an instance of the help viewer component VistaHelp help = new VistaHelp(path); // Show the help window help.showHelp();
Brief instructions:
1. Add the library (VistaHelp11.jar) to the classpath of your project.
2. Create the HTML files (ask.html and toc.html are mandatory!)
3. Open the viewer component through
VistaHelp help = new VistaHelp(...);
help.showHelp();
1. Add the library (VistaHelp11.jar) to the classpath of your project.
2. Create the HTML files (ask.html and toc.html are mandatory!)
3. Open the viewer component through
VistaHelp help = new VistaHelp(...);
help.showHelp();
Find the library and an example help attached.

Diese Seite gibt es auch auf deutsch.

Leave a comment in the forums. You don't need to be registered.