/* Programmer
File:
Purpose
Version:
Target:
Update History:
*/
import java.applet.*;
import java.awt.*;
public class Wormhole extends Applet
{
public void paint(Graphics g)
{
// Declare Variables and Constants
int max=10, bLayer=25;
int x=50, y=50, hSize=350, vSize=200;
int xNew=30, yNew=10, hNew=30, vNew=20, bColor=25;
// Draw a black background
g.setColor(Color.black);
g.fillRect(0,0,500,350);
for(int i=0;i<max;i++)
{
g.setColor(new Color(0,0,bLayer));
g.fillOval(x,y,hSize,vSize);
x+=xNew;
y+=yNew;
hSize-=hNew;
vSize-=vNew;
bLayer+=bColor;
}
// Draw the text
g.setColor(Color.blue);
g.setFont(new Font("TimesRoman", Font.BOLD, 36));
g.drawString("On to Cydonia!", 22, 300);
g.setColor(Color.pink);
g.drawString("On to Cydonia!", 20, 298);
}
}