Draw Red, Green and Blue. WhatRain Java Examples

Draw Red, Green and Blue. WhatRain Java Examples

This applet draws different shades of red, green and blue.
Using a For loop with this code
Color color = new Color( red, green, blue); // Color Object
g.setColor(color); //set color
g.fillRect(x , y, width, height); // draw colored rectangle
Source Code



Test Applet by Timothy M. Radonich from examples in "Black Art of JAVA Game Programming" by Joel Fan, Eric Ries and Calin Tenitchi Copyright (c) 1996 by The Waite Group and/or "1001 Java Programmer's Tips" by Mark C. Chan, Steven W. Griffith, and Anthony F. Iasi Copyright (c) by Jamsa Press *All Rights reserved* Copyright (c) 1997 Timothy M. Radonich

WhatRain Java Examples WhatRain Java 2 Examples
Visit
What Rain Home port

This site designed and maintained by
WhatRain WWW Services

Contact Us

Copyright © 1997 Timothy M. Radonich