2 minute read

ImageButton (version 1.3) is a tiny, fast loading Java applet that simulates a button. It can be used on a web page for navigation. By clicking on this button,you can open other pages. All you have to do is assign a gif image and the destination URL, and everything else is taken care of by the applet! If you want to customize, there is the option of assigning a sound, a second image (for the depressed state), image graying, different border width and even simple animation!!! Look at the examples below.


simple button (click to go home)


button with graying and sound (goes to Software)


button with two images, animation and sound (goes to Photos)


same as above, but without animation (goes to About)

These are the original 1997 applet buttons running live via CheerpJ — give them a few seconds to boot. The original demos used a few images and sounds that have been lost, so these are rebuilt from the assets shipped in ImageButton.zip.

Parameters

ParameterValue
button_upthe gif to be displayed on the button
button_downthe gif to be displayed when the button is depressed
animatetrue or false. Assigning true will cause the applet to animate using the button_up and button_down images when the mouse is over it.
grayImagegray image or not. If assigned true, image will be grayed when the mouse is not over it.
urlURL of the destination link.
statusText that will be displayed at the bottom in the status bar.
targetName of the frame in which the destination page is to be displayed. You can skip this if you are not using frames.
click_soundsound to play when button is clicked
borderthickness of the border in pixels (default=1)

What's new in this version:

  • Virtually no flicker during transitions
  • Faster loading.
  • Support for simple animation
  • Cannot use transparent gifs

You must provide the button_up parameter. The rest are optional and have default values. Replace the WIDTH and HEIGHT in the APPLET tag by the width and the height of your icon.gif. Use a table if you want the appearance of a toolbar.

This applet is absolutely free.

ImageButton.zip (11 kB)

Tags:

Updated: