J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame^] | 1 | <HTML> |
| 2 | <HEAD> |
| 3 | <TITLE>A Clock (1.6)</TITLE> |
| 4 | </HEAD> |
| 5 | <BODY> |
| 6 | <h1>A Clock (1.6)</h1> |
| 7 | <hr> |
| 8 | <applet code="Clock.class" width=170 height=150> |
| 9 | alt="Your browser understands the <APPLET> tag but isn't running the applet, for some reason." |
| 10 | Your browser is completely ignoring the <APPLET> tag! |
| 11 | </applet> |
| 12 | <p> |
| 13 | The clock applet now has three parameters; the background |
| 14 | color (bgcolor), the main foreground color (the hands and |
| 15 | dial) (fgcolor1) and the secondary foreground color (the |
| 16 | seconds hand and numbers) (fgcolor2). These three parameters |
| 17 | are hexadecimal RGB numbers (like the ones used for the body |
| 18 | bgcolor tag in HTML). For example: |
| 19 | <p> |
| 20 | <applet code="Clock.class" width=170 height=150><br> |
| 21 | <param name=bgcolor value="000000"><br> |
| 22 | <param name=fgcolor1 value="ff0000"><br> |
| 23 | <param name=fgcolor2 value="ff00ff"><br> |
| 24 | </applet><p> |
| 25 | would give you a black background, a red dial and hands, and purple numbers. |
| 26 | <p> |
| 27 | For those who don't convert to hexadecimal easily, here are some common |
| 28 | values: |
| 29 | <ul> |
| 30 | <li>black = 000000 |
| 31 | <li>blue = 0000ff |
| 32 | <li>cyan = 00ffff |
| 33 | <li>darkGray = 404040 |
| 34 | <li>gray = 808080 |
| 35 | <li>green = 00ff00 |
| 36 | <li>lightGray = c0c0c0 |
| 37 | <li>magenta = ff00ff |
| 38 | <li>orange = ffc800 |
| 39 | <li>pink = ffafaf |
| 40 | <li>red = ff0000 |
| 41 | <li>white = ffffff |
| 42 | <li>yellow = ffff00 |
| 43 | </ul> |
| 44 | <hr> |
| 45 | <a href="Clock.java">The source</a>. |
| 46 | </BODY> |
| 47 | </HTML> |