Color Box




{If you can read this, your browser dosen`t support Java.}
(Color Button Java Applet)



A colored button Applet. The colors of the button are determined by choosing the percentages of Red, Green, and Blue the user wants at each corner. The remainder of the button is filled using a 2-D linear interperlation from those four points. The default button message and its color are input variables as is the message to show on a mouse over. The URL to switch to on a mouse down (click) event is also an input variable (wouldn't be much use if it wasn't). The button has a 1-pixel black outline always.

The source (.java) and binary (.class) files are free for the taking. Have fun. If you think of any unusual ways to use them drop me a line.

ColorBox.class ColorBox.java


HTML Code

<APPLET code="ColorBox.class" width=150 height=40>
<param name=newURL value="https://members.tripod.com/~SleepyCP/JavaGo/JavaPgms.html">
<param name=Font value="Helvetica">
<param name=Style value="1">
<param name=Size value="28">
<param name=Message value="Press Me">
<param name=Msg1 value="I'm Stuck">
<param name=DeltaH value="0">
<param name=DeltaV value="8">
<param name=FG_Color value="magenta">
Upper Left Hand corner of box.
<param name=rColorIn0 value="100">
<param name=gColorIn0 value="0">
<param name=bColorIn0 value="0">
Upper Right Hand corner of Box.
<param name=rColorIn1 value="50">
<param name=gColorIn1 value="0">
<param name=bColorIn1 value="70">
Lower Left Hand corner of Box.
<param name=rColorIn2 value="70">
<param name=gColorIn2 value="0">
<param name=bColorIn2 value="30">
Lower Right Hand corner of box.
<param name=rColorIn3 value="10">
<param name=gColorIn3 value="0">
<param name=bColorIn3 value="100">
A non Java enabled browser message.
</APPLET>