blob: a0fa63256e5e11553ae9ef9f36110d26a74c0c86 [file] [log] [blame]
<!--***********************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
***********************************************************-->
<HTML>
<HEAD>
<TITLE>A Clock (1.6)</TITLE>
</HEAD>
<BODY>
<h1>A Clock (1.6)</h1>
<hr>
<applet code="Clock.class" width=170 height=150>
alt="Your browser understands the &lt;APPLET&gt; tag but isn't running the applet, for some reason."
Your browser is completely ignoring the &lt;APPLET&gt; tag!
</applet>
<p>
The clock applet now has three parameters; the background
color (bgcolor), the main foreground color (the hands and
dial) (fgcolor1) and the secondary foreground color (the
seconds hand and numbers) (fgcolor2). These three parameters
are hexadecimal RGB numbers (like the ones used for the body
bgcolor tag in HTML). For example:
<p>
&lt;applet code="Clock.class" width=170 height=150&gt;<br>
&lt;param name=bgcolor value="000000"&gt;<br>
&lt;param name=fgcolor1 value="ff0000"&gt;<br>
&lt;param name=fgcolor2 value="ff00ff"&gt;<br>
&lt;/applet&gt;<p>
would give you a black background, a red dial and hands, and purple numbers.
<p>
For those who don't convert to hexadecimal easily, here are some common
values:
<ul>
<li>black = 000000
<li>blue = 0000ff
<li>cyan = 00ffff
<li>darkGray = 404040
<li>gray = 808080
<li>green = 00ff00
<li>lightGray = c0c0c0
<li>magenta = ff00ff
<li>orange = ffc800
<li>pink = ffafaf
<li>red = ff0000
<li>white = ffffff
<li>yellow = ffff00
</ul>
<hr>
<a href="Clock.java">The source</a>.
</BODY>
</HTML>