Modern Java
http://www.modernminds.com
T roubleshooting

This page contains some tips to help you if the Ultimate Button Bar applet is not performing the way that you expect it to perform.

This document is divided into two section: there is a Questions and Answers section, and there is a General Tips section.

If you are unable to solve the problem after reviewing these tips, please submit a problem report.
Q uestions and Answers

To find the answer to a question listed below, just click on the question.
I've added an Ultimate Button Bar applet to my web page, but when I open the page in a browser, I see only an empty rectangle. Why?
I'm designing a button bar, but when I refresh the page after making changes to the button bar definition, the button bar doesn't reflect any of the changes. How to I get the browser to update the button bar?
I copied an example button bar definition from the documentation, but it doesn't work. What's wrong?
I'm using Netscape Navigator 4, which has Java 1.1, but the applet isn't working. Why?
My button bar works fine until I upload it to the web server. What's wrong?
The button bar isn't loading my image file. Why isn't the image loading?
The button bar isn't playing audio file(s). How do I get an audio clip to play?
I've specified a JavaScript function for a button event, but when the button event occurs nothing happens (the JavaScript function is never called). What's wrong?


Q   I've added an Ultimate Button Bar applet to my web page, but when I open the page in a browser, I see only an empty rectangle. Why?

A   If the Ultimate Button Bar applet area on your web page is empty, then most likely you have specified something incorrectly that has confused the applet so much that it can't initialize. Here are some things to check:

  1. Verify that you are using a browser thats fully supports Java 1.1. Some versions of Netscape Navigator 4 require a patch in order to fully support Java 1.1.

  2. Check the applet parameters to make sure that all of the values are correct and valid.

  3. Check the location of the files (i.e., the Java files and your own files).

  4. Check the Button Bar Tags and Attributes to make certain that you didn't leaving something out or type something incorrectly.

  5. Check the Java log.
If none of the above suggestions help, please collect as much information as possible (e.g., your HTML file, your button bar definition, a listing of the Java output log, etc.) and submit a problem report to Modern Minds.


Q   I'm designing a button bar, but when I refresh the page after making changes to the button bar definition, the button bar doesn't reflect any of the changes. How to I get the browser to update the button bar?

A   Some browsers cache files when a page loads, and when the page is refreshed they read files from the cache instead of reloading the files.

The Ultimate Button Bar has a special applet parameter that should provide a solution to the the problem. To force the browser to reload files when the page is refreshed, you should include the following parameter in the applet tag:

<APPLET CODE="UBBApplet.class"
        ARCHIVE="UBB.jar"
        WIDTH="415" HEIGHT="30">

<PARAM NAME="UBBoption" VALUE="develop">
<PARAM NAME="UBBdefnFile" VALUE="MyDefn.txt">

</APPLET>

It is recommended that you always specify this parameter while developing your button bar as it also enables the logging of warning messages to the Java Console.

Once your button bar is finished, you can delete this parameter from the HTML.

See the documentation for the UBBoption applet parameter for further information.


Q   I copied an example button bar definition from the documentation, but it doesn't work. What's wrong?

A   If you copied the definition from a text file (i.e., a file with an extension of ".txt"), then you may not have copied the complete definition, or else there is an error in an applet parameter.

If you copied the definition from one of the HTML documentation pages, then there might be invisible HTML control characters that were copied along with the text. These control characters could be confusing the Ultimate Button Bar's parser.

You might try opening the definition in a word processer (such as Microsoft Word) that has the capability of displaying control characters in the text. If you find control characters in the text (other than a carriage return or tab character), then delete the control characters and try loading the button bar again.

The alternative to the above suggestion is to re-type the definition using a text editor.


Q   I'm using Netscape Navigator 4, which has Java 1.1, but the applet isn't working. Why?

A   The Ultimate Button Bar version 2.0 requires a browser that supports Java 1.1, including the Java 1.1 AWT (Abstract Windowing Toolkit).

When Netscape released version 4 of the Navigator browser, they included only partial support for Java 1.1. The key piece of the Java 1.1 specification that was omitted from Navigator 4 was the AWT.

Since the time that Navigator 4 was released, Netscape has released a patch for Navigator that adds the missing AWT functionality, but the patch must be manually installed.

You may visit the Netscape site to download the patch or for information regarding newer versions of Navigator that fully support Java 1.1.


Q   My button bar works fine until I upload it to the web server. What's wrong?

A   You most likely have a problem with the capitalization of one or more file names.

Some operating systems are sensitive to character case in file names, while others are not. Windows 95 and Windows NT, for example, will treat the names "ButtonBarDefn.txt" and "buttonbardefn.txt" as referring to the same file. The same two file names on a UNIX system, however, would refer to two different files.

Since a great many web servers run on a UNIX platform, you should make sure that the capitalization of any file name that you specify for an applet parameter or tag attribute exactly matches the capitalization of the actual file on the server.

Also, make sure that the program that you use to upload files to the server does not change the capitalization of the file name (some FTP programs can change file name capitalization automatically when a file is uploaded).


Q   The button bar isn't loading my image file. Why isn't the image loading?

A   The first thing to check is the Java Log. The applet should have written an error message to the log that can help you identify what is causing the problem.

Two of the most common mistakes are: to misspell the image file name, or to forget to place quotation marks around the name if the file name contains upper and lower case characters.

Also, double check to make sure that you have specified the correct directory for the image file if the image file is not in the same directory as the applet.


Q   The button bar isn't playing audio file(s). How do I get an audio clip to play?

A   First check to make sure that the audio clip file name is spelled correctly and that the capitalization of the characters in the file name exactly match the name of the actual file.

Next, verify that the audio file is in the same directory as the applet, or that it is in a directory below the directory that contains the applet. If a path specified for an audio file references a directory above the directory that contains the applet, then the applet will most likely not be able to load the audio file due to security restrictions placed upon applets by Java.

Finally make certain that the audio file is in the correct AU audio file format (WAV and other types of audio files currently cannot be played by Java).

An "AU" audio file must be created using a 16-bit mono, 8,000 Hz sampling rate, then saved in the "AU" mu-Law 8-bit audio file format.

There are a number of utilities available that can be used to create audio files in the "AU" audio file format, or that can be used to convert other audio file formats to the "AU" audio file format. One program that is recommended for Win95/NT users is Cool Edit.


Q   I've specified a JavaScript function for a button event, but when the button event occurs nothing happens (the JavaScript function is never called). What's wrong?

A   First, verify that the browser that you are using supports JavaScript.

If the browser does support JavaScript, then double check to make sure that you have specified the MAYSCRIPT attribute for the applet tag.

Next, check the Java Log for error messages.

Finally, you may want to review the JavaScript from Applet documentation.
G eneral Tips

The following are some general tips that might be of help to you if you are trying to figure out why the Ultimate Button Bar applet doesn't seem to work.
Check the Applet Parameters

Many common problems occur when the Ultimate Button Bar applet parameter names or the applet parameter values are specified incorrectly.

For each PARAM tag in the Ultimate Button Bar applet tag, make sure that the spelling and the capitalization of each NAME and VALUE is correct (applet parameters names are case sensitive).

Also, make sure that you understand the effect that each parameter has and what (if any) additional parameters might be required. The documentation should have all the information you need.
Check the Button Bar Tags and Attributes

Make certain that each opening <AREA>, <BAR>, and <BUTTON> tag has a matching closing tag (i.e, a </AREA>, </BAR>, or </BUTTON> tag).

Verify that all tags are enclosed within a single <AREA> tag (the first tag in the definition should be an <AREA> tag and the last tag should be an </AREA> tag).

Check the tag attributes for each tag. Tag attribute names may be in upper case, lower case, or mixed case. Tag attribute values are always converted to lower case unless they are surrounded by quotation marks.

If you specify a file name for an attribute value and forget to surround it with quotation marks, then the file may not be found if the actual file name has any upper case characters in the file name (the file name specified for the attribute value is converted to lower case if not enclosed in quotation marks).

Finally, make sure that you understand the effect that each attribute has and what (if any) additional attributes might be required. The documentation should have all the information you need.
Check the Java Log

If an error occurs in a Modern Minds Java applet, the applet will log an error message to the Java console or to a log file. By reviewing the error message, you can often determine why the applet is not working (e.g., a missing or misspelled parameter).

Please see the Java Log documentation for information regarding how to access the Java Log for your browser.
Check the Location of Files

The Ultimate Button Bar applet expects to find its program code and the files that you are using in your button bar design in a specific location. Where that location actually is depends upon how the <APPLET> tag is defined in your HTML, and it also depends upon any paths that you have specified for files.

If the Ultimate Button Bar cannot find its code or your files because you have entered something incorrectly, then the applet will either not work, or it will work, but it will not work in the way that you are expecting.

If you are unsure of how the <APPLET> tag works, or if you are not sure that you specified the path to a file correctly, please look at the Installation documentation, the Applet Tag documentation and review the documentation for each definition tag attribute where a file is specified (e.g., graphics files and/or audio files).
Copyright © 1998 by Modern Minds, Inc.