アットウィキロゴ

食いラフ

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

class game extends Frame{

int[] code=new int[10000];
int[] year=new int[10000];
int[] month=new int[10000];
int[] day=new int[10000];
int[] oprice=new int[10000];
int[] hprice=new int[10000];
int[] lprice=new int[10000];
int[] cprice=new int[10000];
int[] rprice=new int[10000];
int[] volume=new int[10000];
int tsecode[]=new int[10000];  
int tsenumber;
int datanumber;
int ph,pl,pc,po;
int s,c,sx;
int h;
int stock;
int money;
int n,p;
String file;

public static void main(String [] args) {
Frame f=new game();
f.setTitle("game");
f.setSize(700,700);
f.setBackground(Color.yellow);
f.setVisible(true);
}

game(){

getcode gc=new getcode();
gc.makedata();  
tsecode=gc.tsecode;
tsenumber=gc.tsenumber;

c=500;

file="data/"+tsecode[c]+".txt";

tsedata cd=new tsedata();
cd.makedata(file);
datanumber=cd.datanumber;
hprice=cd.hprice;
lprice=cd.lprice;
oprice=cd.oprice;
cprice=cd.cprice;
rprice=cd.rprice;
year=cd.year;
month=cd.month;
day=cd.day;
volume=cd.volume;

addWindowListener(new stopwin());

}

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

public void paint(Graphics g){
int pc,po;
for(s=1;s<500;s++){
pc=cprice[s]/10;
po=oprice[s]/10;
g.setColor(Color.blue);
if(pc>po)g.fillRect(100+s,600-pc,1,pc-po);
if(pc==po)g.fillRect(100+s,600-pc,1,1);
g.setColor(Color.red);
if(po>pc)g.fillRect(100+s,600-po,1,po-pc);
}



}


}
最終更新:2011年04月17日 13:35