Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Created by Daniel on 8/31/2016.
- */
- import java.awt.*;
- import java.applet.*;
- public class Lab04b extends Applet {
- public void paint(Graphics g){
- g.drawRect(50,50,300,300);
- g.drawLine(50,50,150,150);
- g.drawLine(350,50,450,150);
- g.drawRect(150,150,300,300);
- g.drawLine(50,350,150,450);
- g.drawLine(350,350,450,450);
- for(int n = 0; n < 4;n++)g.drawOval(600,50+n*40,320,320 - n*80);
- for(int n = 0;n<4;n++)g.drawOval(600+n*40,50,320- n*80,320);
- g.drawOval(750,350,270,270);
- g.drawLine(885,620,750,485);
- // g.drawLine(817,552,980,389);
- g.drawLine(980,389,750,485);
- g.drawLine(885,620,980,389);
- g.drawOval(799,443,128,128);//795,417,135,135
- g.fillRect(50,500,20,100);
- g.fillRect(90,500,20,100);
- g.fillRect(50,500,60,20);
- g.fillRect(50,540,60,20);//
- g.fillRect(50+80,500,60,20);
- g.fillRect(130,540,60,20);
- g.fillRect(130,500,20,100);
- g.fillRect(130+40,500,20,60);//
- g.fillRect(210,500,20,100);
- g.fillRect(210,500,60,20);
- g.fillRect(210,580,60,20);//
- g.fillRect(290,500,60,20);
- g.fillRect(290,500,20,60);
- g.fillRect(290,540,60,20);
- g.fillRect(330,540,20,60);
- g.fillRect(290,580,60,20);
- g.fillArc(500,480,90,90,135,-270);
- g.fillArc(560,420,90,90,135,270);
- g.fillArc(620,480,90,90,45,270);
- g.fillArc(560,540,90,90,225,-270);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment