navBar Applet

compassThe navBar applet is a quick and easy way to add dynamic navigation to your site. It is fully customizable. You can change the color of the buttons and the font color (note: on a Mac, the Java Run Time does not allow you to change button colors; however, since the Mac buttons look great as is, I don't mind). You can change the labels (of course), and you can customize the number of buttons. You can point to URLs on your server or remote URLs. You can even choose to have the navBar display either horizontally or vertically (like it is here).

Unlike a Javascript solution (which may require multiple images (2 for each button) and coding that could easily total over 15k just for this site), this Java based applet is a nice, trim 3k in size. It will load much faster and you won't have to go make any images.

The navBar applet also works with frames (if you use such things).

Where Can I Get It?

You can download the navBar file right here (navBar.jar - 3k).

How Do I Use It?

You will need to upload the navBar applet to your website. You will then need to add an applet tag similar to this (in HTML 4.01)):

<applet code="navBar.class" width="130" height="100" codebase="." archive="navBar.jar">
<param name="buttons" value="4">
<param name="backgroundColor" value="0099ff">
<param name="fontColor" value="ffffff">
<param name="HorizVert" value="v">
<param name="target" value="_self">
<param name="label1" value="Apple">
<param name="url1" value="http://www.apple.com">
<param name="label2" value="Marvel">
<param name="url2" value="http://www.marvel.com">
<param name="label3" value="DC Comics">
<param name="url3" value="http://www.dccomics.com">
<param name="label4" value="unearthed @ .mac">
<param name="url4" value="/unearthed/index.html">
</applet>

You will need to fill in a directory for the codebase part of the applet tag only if you are keeping the navBar.class file in a different directory than the HTML. For example, your codebase for the applet could be /unearthed/applets — which, just like an image file in HTML, points the browser up one directory to a directory called applets (if you have multiple applets stored in a single folder called applets).

Here are how the parameters are broken down:

Applet Parameters and what they mean
ParameterTypeDescription
buttonsNumberNumber of buttons to display
backgroundColorHex numberA hex value for the color you want for the buttons (no # sign)
fontColorHex numberA hex value for the color you want for the button labels (no # sign)
HorizVerth or vh for Horizontal alignment, v for vertical
targetframe targetIf using frames, the name of your target frame for the links: frame name, _self, _top, _blank, _parent
label#TextThe text that will be displayed on the button (don't skip numbers)
url#Text/urlThe link you want the button to point to (relative or absolute (http) references are OK)

Once you have all of the parameters ready, you will probably need to adjust the applet's height and width properties to display everything just the way you like it. Other than that, that's it.