Example 1: Simple Applet In A Page

Example 1


If you just seeing nothing above, a gray square or a funny symbol then go here.

<applet code="org.webcamapplet.WebCamApplet0_1_1.class" archive="webcamapplet0_1_1.jar" name="Applet1" width="160" height="140" VIEWASTEXT>
<param name=width value="160">
<param name=height value="140">
<param name=labelHeight value="20">
<param name=delayMillis value="6000">
<param name=camRetrySecs value="20">
<param name=camviewLimitMins value="2">
<param name="labelReloadSecs" value="3">
<param name="title" value="Example 1">
<param name=onImage value="camview.jpg">
<param name=offImage value="offimage.jpg">
<param name=limitImage value="limitimage.jpg">
<param name=click value="http://webcamapplet.sourceforge.net/">
<param name=logging value="false">
</applet>

The images I'm using here are 3 fixed ones below:

camview.jpg limitimage.jpg offimage.jpg

Example 2: Applet In A Popup Window

Launch Popup

This has the same <applet...> HTML as the last example, except that there is some more fancy HTML around it.

To avoid closing the page you're on (annoying) the link is coded with a target like this:

<a href="dopopup.html" target="newwebcamwin">Launch Popup</a>

In fact there are two separate pages:

1. dopopup.html (the link above) which spawns the popup.

<html>
<head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>WebCamApplet</title>
<script language="Javascript">
<!-- hide
function dopopup() {
window.open('popup.html', 'WebCamApplet', 'scrollbars=0,status=0,toolbar=0,resizable=0,width=180,height=180,top=160,left=185');
window.close();
}
// end hide -->
</script>
</head>
<BODY onLoad="dopopup()">
</body>
</html>

2. popup.html the page with the applet in.

<html>
<head>
<title>WebCamApplet</title>
</head><body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#000080" alink="#0000FF">
<center>
<table width="100%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="middle">
<applet code="org.webcamapplet.WebCamApplet0_1_1.class" archive="webcamapplet0_1_1.jar" name="Applet1" width="160" height="140" VIEWASTEXT>
<param name=width value="160">
<param name=height value="140">
<param name=labelHeight value="20">
<param name=delayMillis value="6000">
<param name=camRetrySecs value="20">
<param name=camviewLimitMins value="2">
<param name="labelReloadSecs" value="3">
<param name="title" value="Example 1">
<param name=onImage value="camview.jpg">
<param name=offImage value="offimage.jpg">
<param name=limitImage value="limitimage.jpg">
<param name=click value="http://webcamapplet.sourceforge.net/">
<param name=logging value="false">
</applet></td>
</tr>
<tr>
<td align="center" valign="top">
<center>
<a href="http://webcamapplet.sourceforge.net" target="old"><font size="-1"><em><font face="Arial, Helvetica, sans-serif">WebCamApplet
Home</font></em></font></a>
</center></td>
</tr>
</table>
</center>
</body>
</html>

Problems?

If you don't see a handsome herbivore at the top of the page and believe that you have a browser that supports Java then it clearly hasn't worked on your system.

"Java: write once, run anywhere".

Anywhere except on Microsoft's gloriously "individual" implementation of it that is...

One of the prime goals of this project is to improve browser compatibility and I'm afraid yours is one I've obviously not covered yet. Sorry!