Sample Topics:
Permission to use
Embedding Applets
TAR files
Source Code
Versions of Java
Versions of applets
Versions of browsers
Java vs. JavaScript
Sound files
Image files
Fonts
Colors

More below...

Frequently Answered Questions


Please read the following before sending Eric e-mail. He encourages correspondence inspired by The Applet Depot, but he has seen the following questions come up time and again. Eric cannot guarantee that your email will get an answer... sorry... he's a busy guy [grin].

Also, if you have more in-depth questions about Java, The Java Programmer's FAQ is heartily recommended.

  1. Do you do custom/contract work? Can you modify one of your applets for me?

    I do contract work, but not for free. I try to make the applets that are available for download as flexible as possible so that they might meet the needs of most casual users. If you would like to talk to me about customizing one of the existing applets or creating a brand new applet/program for your (or your company's) pages, please consult my Contracting/Consulting page. Past clients for my work include The LEGO Company, CNET, Macromedia, ZDNet, New Line Cinema, and Sun Microsystems.

  2. Are these applets free?

    The compiled applets are free for use on personal or commercial webpages. You may use the '.class' files to implement the applets on your own pages (and customize them according to the parameters). The compiled '.class' files for a particular applet are obtained by clicking on the TAR file link that is available on each description page for an applet. Note that while the applets are free for personal or commercial use, if you or your company feel inclined to do so, you are welcome to reimburse me for prominent use of my applets. Contact me about this and we can discuss appropriate fees.

    Also note that in some of the demonstrations of my applets I use images which have copyrights held by separate entities. If you use the applets for yourself (especially for commercial purposes, you should replace such images with restriction free material.

  3. How do I embed an applet into a webpage?

    To put one of the applets from The Applet Depot onto one of your own webpages, you should follow these steps:

    1. Download the appropriate TAR file from the webpage that describes the particular applet you want. Each description page has such a link, and the TAR file contains the '.class' files that you need.
    2. unTAR the '.tar' file that you downloaded. Another question/answer discusses how to unTAR the file if you are uncertain.
    3. Put the files you extracted from the '.tar' file (they should all be '.class' files) into the same directory/folder as the webpage you are writing (unless you use the codebase tag below).
    4. In the actual HTML of the webpage you must include a set of <applet></applet> tag. You can look at the source of the description page to see a basic example. The applet tag MUST include attributes for code= (which points to the main applet class file -- ending in ____ech.class), width=, height=. Other attributes are optional, including:
      • align=
      • alt=
      • codebase= Use this tag ONLY if you want to put the '.class' files in a directory other than that which houses the webpage. This value should indicate the directory path to whatever folder you want to hold the '.class' files.
      • archive= You may, if you want, archive all the '.class' files into a single '.zip' or .'jar' file in an attempt to speed up the applet's download for users (I use '.jar' files). This is NOT NECESSARY, though, and if you do not want to fool with it, LEAVE THIS ATTRIBUTE OUT of the HTML code. More information about the '.jar' format may be found at Sun Microsystem's Java pages.

      Between the basic applet tags, you will want to include various <param> tags so that the applet can be customized for your pages with your own images or sound files or whatever. Two of the parameter tags ARE NECESSARY: The AUTHOR parameter and the COPYRIGHT parameter. None of the applets will work correctly if you do not include these parameters in each applet from The Applet Depot (and if you do not include the exact value for the parameter as indicated on the appropriate applet description page).

      Many of the parameter tags let you refernce image files or sound files that are also on your web server. If you don't want to include a particular image or sound in your implementation of an applet, OMIT the parameter completely. Any directory paths specified in image/sound parameters are assumed to either be complete URL addresses or directory paths relative to the directory holding the webpage (not necessarily the same directory holding the '.class' files).

    5. Finally, you may also include Alternate HTML between the applet open/close tags. This HTML will only be shown to web browsers that do not supprt Java (or to browsers in which Java capability has be de-activated).

    All of this said, your HTML code will look something like this (though you might leave out codebase, archive, and such):

    <applet code=______.class width=___ height=____ codebase=____ archive=____>
    <param name=AUTHOR value="Eric Harshbarger, http://www.ericharshbarger.org">
    <param name=COPYRIGHT value=...>
    ...
    ALTERNATE HTML BETWEEN APPLET TAGS
    </applet>
    

  4. How do I unTAR your applets?

    Each applet page should have a link to a TAR file which you should be able to click on and download through the browser (you might try SHIFT-clicking). TAR files may be 'unTARred' using many publicly available programs (or, in Unix, just use the 'tar' command: tar -xvf FileName.tar). I believe WinZip (version 6.1+) handles TAR files in addition to .zip files. There is also a Mac program available to unTAR files.

  5. Do you write/code JavaScript?

    No. For those who do not realize it: Java and JavaScript are two very different things (despite their horribly similar names). I do not do any professional work in JavaScript, only Java. Furthermore, if you use any of the Applet Depot's applets on your webpages, you should tell visitors that they need a Java enabled browser (not a JavaScript enabled browser).

  6. Hey!... I just downloaded one of your applets and it's not working correctly. Can you take a look at my page, and the HTML code and see what I'm doing wrong?

    Sorry... I don't really have time to look at HTML source of pages into which you are trying to add an applet. I have tested the applets on the latest versions of both Netscape and Internet Explorer, and they all function properly unless otherwise noted. Here are some things you can quickly doublecheck:

  7. I'm trying to use one of your applets, but I keep getting 'this or that' error message... what's wrong?

    Besides the problems listed above, there are so many things that could possibly be wrong, I won't try to write a complete list, but here are a few common Error/Exception messages people keep asking about, none of which has anything to do with a problem in the applet itself:

    Web browsers generally have a 'Java Console' window which spits out messages of greater length than the one-line status bar at the bottom of the browser. This console may give you a little more insight as to what type of error is going on.

  8. Hey!... I'm just learning Java. Can you give me help?

    See above. I'm happy that so many people are interested in Java and that they want to ask me general programming questions, but again, I have enough trouble keeping up with my own projects. If you are interested in learning more about Java programming, I suggest you take a look at the homepage for Javasoft at Sun Microsystems.

  9. Is the source code available for the applets at The Applet Depot?

    No, not currently.

  10. What version of Java is used for these applets?

    Currently most of the applets at The Applet Depot are compiled under Java1.0.2. They should work with all Java compliant browsers which are available today. Applets written in other versions of Java will be appropriately noted (for example, '1.1j' denotes applets written in Java version 1.1+). Java 1.1+ is not supported by older browsers; Netscape did not fully support it until version 4.06 and higher (earlier versions of 4.0 required a patch). Internet Explorer seems to support Java 1.1 as early as version 4.0.

  11. Do you update your applets with version numbers?

    Yes. The main '.class' file of any of the applets from the Applet Depot should end with ___#ech.class where the # indicates the version number of the applet. The latest version of a particular applet is always available at the Applet Depot. If you have seen one of my applets out on the web but notice that the applet at the Depot has a different (higher) number, fear not, it just means that you are seeing the latest version.

  12. Do these applets work on all browsers?

    I develop my applets with Netscape in mind, and before distributing them, I test them on the following Windows 95 browsers:

    • Netscape 4.7
    • Netscape 4.61
    • Netscape 4.5
    • Netscape 4.06
    • Netscape 3.04 Gold (1.1 Java applets not supported, see above)
    • Internet Explorer 4.0
    If I notice any problems, either I will not release the applets or I will make a note of the trouble on my webpages.

  13. What type of sound file formats can I use for the applets?

    Java v1.0.2 only supports the 'voice format' of the .au sound files. This is also know as 'µ-law, 8-bit, mono, 8000hz sample rate' aka... the lowest possible quality of sound. Multimedia flexibility is being worked on for the next Java release by Javasoft.

  14. What type of image file formats can I use for the applets?

    You may use GIF or JPG images with applets. I would be wary of using Animated GIFs or interlaced/progressive GIFs/JPGs.

  15. Can I use transparent GIFs in an applet?

    Yes, but it will not allow you to see the background of your webpage housing the applet. Web browsers allocate an area of the web page for the applet... and this area is forced to be light gray in color (usually). So, if you use a transparent GIF in your applet, you will simply see back to the gray background. Most of the applets at The Applet Depot; have some sort of parameter to allow you to pick a background color for the applet (parameter BGCOLOR, usually). Some even let you load in a background image (which can be matched, somewhat, to the web page's background).

  16. What about the sound/picture files that you use in your examples... can I use them also?

    You should be able to access any sound files and images files with your web browser (if you point the browser directly at those files). You are welcome to use and of the sounds or images (note that many of the images in the examples I provide are not mine, so I hold no claim to their respective copyrights; I am only using them for demonstration purposes).

  17. What type of fonts can I use for the applets?

    Java v1.0.2 is limited in its font choices. To be safe with cross-platform names stick with one of the following (exactly as named): TimesRoman, Courier, Dialog, DialogInput, Helvetica. Font size can be just about any positive integer, but certain browsers don't support values greater than 36. The font style may be either: 'plain', 'bold', 'italic', or 'bolditalic'.

  18. What colors may be used? How are they represented?

    Most of the applets at The Applet Depot will accept colors as an RGB triplet separated by commas: #,#,#. For example, '0,0,0' is black, '192,192,192' is lightGray. You may NOT use simple color names (such as 'black' or 'blue'). The default used for BGCOLORs is usually lightGray, while for FGCOLORs it is usually black.

  19. Is there a standard blurb I should put on my page if I do use one of your applets?

    Standard? Hmmm... just link to The Applet Depot's front page (http://www.ericharshbarger.org/java/), and maybe mention me by name (Eric Harshbarger).

  20. May I make suggestions about future revisions to an applet?

    Go for it. I am always willing to hear new ideas. I cannot guarantee the suggestion will be implemented, but I will consider it.

  21. What is the schedule for applet updates?

    Schedule?.. what?... hehehe... yeah... right.

  22. What development tools do you use to write/program Java?

    I use the standard compiler that comes with Sun Microsystems' Java Development Kit (JDK), and whatever simple text editor is available on the OS platform (usually 'Notepad' on Windows or 'vi' on Unix).


If your questions are still not answered, feel free to email me.

APPLET DEPOT: INTRO - NEWS - APPLETS - DEMOS - CUSTOM - FAQ - EMAIL
The Applet Depot and all associated applets, text, scripts, and images, Copyright © 1998-2002 by Eric Harshbarger unless otherwise noted. 'Java' is a registered trademark of Sun Microsystems Incorporated.