[click to enlarge]

import java.awt.*;

public class HerkyFrame extends Frame
{
//constructor for new frame
HerkyFrame()
{
setBackground(Color.black);
setTitle("Herky");
setSize(500, 600);
setLocation(150, 100);
setVisible(true);
}

public static void main(String [] args)
{
HerkyFrame Herky = new HerkyFrame(); //makes new frame with above parameters
}

//Drawing objects on the frame below
public void paint(Graphics g)
{
//coordinates used for 3D Rect.; will be changed during the loop
int x = 10;
int y = 50;
int m = 480;
int n = 400;
int z = 1;
while (z <= 18) //loop to make 18 rectangles
{
g.setColor(Color.yellow);
g.draw3DRect(x,y,m,n,true);
z++;
x=x+5;
y=y+5;
m=m-10;
n=n-10;
}

//Makes the text "Herky"
g.setColor(Color.yellow);
Font f = new Font("Helvetica", Font.BOLD, 100);
g.setFont(f);
g.drawString("Herky",110, 275);

//Coordinates for the 24 yellow rectangles
int x2 = 12;
int y2 = 475;
int m2 = 15;
int n2 = 50;
for (int t=1; t<=24; t++) //Loop to make the 24 rectangles
{
g.setColor(Color.yellow);
g.fillRect(x2,y2,m2,n2);
x2=x2+20;
}

//Loop to make the 5 lines at the bottom
int y3 = 540;
for (int l=1; l<=5; l++)
{
g.setColor(Color.yellow);
g.fillRect(10,y3,480,3);
y3=y3+10;
}
}
}



web
print
projects



home
contact

p: 515.532.3041 e: brandon-r-miller@uiowa.edu f: 509.267.4550