Make your own free website on Tripod.com

topm
topb
HOME CSS First Line
First Event
Max
Window Blind

Star Test

import java.awt.*; import java.applet.Applet; import java.awt.event.*; import java.util.Random; import java.awt.Font; import java.awt.Color; public class StarTest extends Applet implements ActionListener { private int numStars=0; Random generator=new Random(); Font f=new Font("Dialog", Font.ARIAL, 40); Image guitarImage;private void drawStars(Graphics g, int x, int y, int w, int l) { g.drawLine(x, y, x-w/2, y-l); g.drawLine(x-w/2, y-l, x-w, y); g.drawLine(x-w, y, x+w/10, y-l*2/3); g.drawLine(x+w/10, y-l*2/3, x-l-w/10, y-l*2/3); g.drawLine(x-l-w/10, y-l*2/3, x, y); } public void paint(Graphics g) { Color[] colorArray={Color.black, Color.blue, Color.cyan, Color.darkGray, Color.gray, Color.green, Color.lightGray, Color.magenta, Color.orange, Color.pink, Color.red, Color.yellow}; for(int i=0; i

Class Links

Eric Yue
Toby Hsieh
Vinh Nguyen
Donald Pang
Chris Ng
Joe May
Danny Wu
Stephen Lan
Brian Cheng
Derek Windham
John Bunag
Copyright 2005 :: Max Ledeux