import java.awt.*;
import java.awt.event.*;
import java.io.*;
double c[][]=
new double[6][6];
double y1[][]=new double[6][6];
double y2[][]=new double[6][6];
public static void main(String [] args) {
Frame f=new pro();
f.setTitle("pro");
f.setSize(700,700);
f.setBackground(Color.yellow);
f.setVisible(true);
}
pro(){
int s1,s2;
try{
BufferedReader br =
new BufferedReader(new FileReader("tax.[[txt]]"));
String[] test = new String[25];
String str;
String x[]=new String[5];
for(int i=0; i<25; i++){
str = br.readLine();
x=str.split(",");
s1=Integer.valueOf(x[0]);
s2=Integer.valueOf(x[1]);
c[s1][s2]=Double.valueOf(x[2]);
y1[s1][s2]=Double.valueOf(x[3]);
y2[s1][s2]=Double.valueOf(x[4]);
}
br.close();
}
catch(IOException e){System.out.println("入出力エラーです。");}
addWindowListener(new stopwin());
}
class stopwin extends WindowAdapter{
public void windowClosing(WindowEvent we){System.exit(0);}
}
public void paint(Graphics g){
int x1,x2,c1,c2;
int s1,s2;
g.setColor(Color.blue);
for (s1=1;s1<5;s1++){
for (s2=1;s2<5;s2++){
c1=(int)(500*c[s1][s2]);
c2=(int)(500*c[s1+1][s2]);
x1=(int)(500*y1[s1][s2]);
x2=(int)(500*y1[s1+1][s2]);
g.drawLine(
100+x1,600-c1,100+x2,600-c2);
}
}
}
}
最終更新:2010年11月05日 05:49