import java.awt.*;
import java.awt.event.*;
class
pro extends Frame {
public static void main(String [] args) {
Frame f=[[new]] pro();
f.setTitle("pro");
f.setSize(600,600);
f.setBackground(Color.yellow);
f.setVisible(true);
}
pro(){
addWindowListener(new stopwin());
}
class stopwin extends WindowAdapter{
public void windowClosing(WindowEvent we){System.exit(0);}
}
public void paint(Graphics g){
int z;
int kaox,kaoy;
int bodyx,bodyy;
int heapx,heapy;
int wlegx,wlegy;
int llegx,llegy;
int wmomox,wmomoy;
int lmomox,lmomoy;
int wfootx,wfooty;
int lfootx,lfooty;
int wkatax,wkatay;
int lkatax,lkatay;
int wudex,wudey;
int ludex,ludey;
int wtex,wtey;
int ltex,ltey;
kaoy=25;
kaox=0;
g.setColor(Color.blue);
g.fillOval(250+kaox-5,
100+kaoy-5,10,10);
bodyy=75;
bodyx=0;
g.fillOval(250+bodyx-5,100+bodyy-5,10,10);
heapy=
125;
heapx=0;
g.fillOval(250+heapx-5,100+heapy-5,10,10);
lmomoy=175;
lmomox=-10;
g.fillOval(250+lmomox-5,100+lmomoy-5,10,10);
wmomoy=175;
wmomox=10;
g.fillOval(250+wmomox-5,100+wmomoy-5,10,10);
llegy=225;
llegx=-10;
g.fillOval(250+llegx-5,100+llegy-5,10,10);
wlegy=225;
wlegx=10;
g.fillOval(250+wlegx-5,100+wlegy-5,10,10);
lfooty=300;
lfootx=-10;
g.fillOval(250+lfootx-5,100+lfooty-5,10,10);
wfooty=300;
wfootx=10;
g.fillOval(250+wfootx-5,100+wfooty-5,10,10);
lkatay=50;
lkatax=-20;
g.fillOval(250+lkatax-5,100+lkatay-5,10,10);
wkatay=50;
wkatax=20;
g.fillOval(250+wkatax-5,100+wkatay-5,10,10);
ludey=50;
ludex=-50;
g.fillOval(250+ludex-5,100+ludey-5,10,10);
wudey=50;
wudex=50;
g.fillOval(250+wudex-5,100+wudey-5,10,10);
ltey=100;
ltex=-50;
g.fillOval(250+ltex-5,100+ltey-5,10,10);
wtey=100;
wtex=50;
g.fillOval(250+wtex-5,100+wtey-5,10,10);
g.setColor(Color.red);
g.drawLine(250+kaox,100+kaoy,250+bodyx,100+bodyy);
g.drawLine(250+bodyx,100+bodyy,250+heapx,100+heapy);
g.drawLine(250+heapx,100+heapy,250+wmomox,100+wmomoy);
g.drawLine(250+heapx,100+heapy,250+lmomox,100+lmomoy);
g.drawLine(250+wlegx,100+wlegy,250+wmomox,100+wmomoy);
g.drawLine(250+llegx,100+llegy,250+lmomox,100+lmomoy);
g.drawLine(250+wfootx,100+wfooty,250+wlegx,100+wlegy);
g.drawLine(250+lfootx,100+lfooty,250+llegx,100+llegy);
g.drawLine(250+wkatax,100+wkatay,250+bodyx,100+bodyy);
g.drawLine(250+lkatax,100+lkatay,250+bodyx,100+bodyy);
g.drawLine(250+wkatax,100+wkatay,250+wudex,100+ludey);
g.drawLine(250+lkatax,100+lkatay,250+ludex,100+ludey);
g.drawLine(250+wtex,100+wtey,250+wudex,100+ludey);
g.drawLine(250+ltex,100+ltey,250+ludex,100+ludey);
}
}
最終更新:2010年10月28日 03:56