アットウィキロゴ

ch10

import java.awt.*;
import java.awt.event.*;

class ch10 extends Frame{

int year,age;
double z;
double m2[][]=new double[100][100];
double f2[][]=new double[100][100];
double z2[]=new double[200];

public static void main(String [] args) {
        ch10 f=new ch10();
        f.setTitle("厚生年金被保険者");
        f.setSize(700,700);
        f.setBackground(Color.blue);
        f.setVisible(true);
    }

ch10(){

make10 mk10=new make10();
mk10.makedata();
m2=mk10.m2;
f2=mk10.f2;

make75 mk75=new make75();
mk75.makedata();
z2=mk75.z2;  

addWindowListener(new stopwin());
}


class stopwin extends WindowAdapter{
    public void windowClosing(WindowEvent we){System.exit(0);}
}  


public void paint(Graphics g){  
int gx;
g.drawLine(100,600,600,600);
g.drawLine(100,600,100,100);
for (year=10;year<100;year++){
gx=(int)z2[year]/10;
g.setColor(Color.black);
g.drawRect(100+5*year,600-gx,5,gx);
z=0;
for(age=15;age<70;age++){
z=z+m2[year][age]+f2[year][age];
}
gx=(int)z/10;
g.setColor(Color.red);
g.drawRect(100+5*year,600-gx,5,gx);
}




}

}
最終更新:2011年03月20日 15:15