Also, if you have more in-depth questions about Java, The Java Programmer's FAQ is heartily recommended.
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.
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.
To put one of the applets from The Applet Depot onto one of your own webpages, you should follow these steps:
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).
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>
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.
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).
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:
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:
Be sure that you have downloaded all classes necessary for the particular applet, and that they all reside in the correct directory. Some applets require more than one .class file (if multiple are needed, they will be listed on the applet description page).
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.
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.
No, not currently.
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.
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.
I develop my applets with Netscape in mind, and before distributing them, I test them on the following Windows 95 browsers:
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.
You may use GIF or JPG images with applets. I would be wary of using Animated GIFs or interlaced/progressive GIFs/JPGs.
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).
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).
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'.
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.
Standard? Hmmm... just link to The Applet Depot's front page (http://www.ericharshbarger.org/java/), and maybe mention me by name (Eric Harshbarger).
Go for it. I am always willing to hear new ideas. I cannot guarantee the suggestion will be implemented, but I will consider it.
Schedule?.. what?... hehehe... yeah... right.
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 I notice any problems, either I will not release the applets or I will make a note of the trouble on my webpages.