Download:
Quadrat.java |

import java.applet.Applet;
import java.awt.*;
public class Gitter extends Applet{
public void paint(Graphics g){
for (int x=0; x<=10;x++){
g.drawLine(50+x*30,50,50+x*30,200);
}
for (int y=0;y<=5;y++){
g.drawLine(50,50+y*30,350,50+y*30);
}
}
}
|
Download:
Kreise.java |

import java.applet.Applet;
import java.awt.*;
public class Kreise extends Applet{
public void paint(Graphics g){
for (int radius = 2; radius<=150;radius+=5){
g.drawOval(180-radius, 180-radius, radius*2, radius*2);
}
}
}
|
Downlaod:
Muster.java |

import java.applet.Applet;
import java.awt.*;
public class Muster extends Applet{
public void paint(Graphics g){
for (int x = 30; x<= 280;x+=25){
for (int y = 30; y<=155 ; y+=25){
g.drawLine(x,y,x+20,y);
g.drawLine(x+20,y,x+20,y+20);
g.drawLine(x+20,y+20,x+5,y+20);
g.drawLine(x+5,y+20,x+5,y+10);
g.drawLine(x+5,y+10,x+10,y+10);
g.drawLine(x+10,y+10,x+10,y+15);
g.drawLine(x+10,y+15,x+15,y+15);
g.drawLine(x+15,y+15,x+15,y+5);
g.drawLine(x+15,y+5,x,y+5);
g.drawLine(x,y+5,x,y+25);
}
}
}
|