Point ioc=evt.getPoint();
X=ioc.x;
Y=ioc.y;
Graphics gten;
gten=getGraphics();
gten.setXORMode(Color.white);
gten.setColor(Color.blue);
int Axsis;
if(ioc.x >leftMargine & ioc.x< w+leftMargine & ioc.y>topMargine & ioc.y<h+topMargine){
try{
Axsis=(X-leftMargine)/hx; //设定横座标范围
//在以下区域内,把鼠标当前横座标处的各种股票参数显示在相应的标签上
label[0].setText(xCode[Axsis]);
label.setText(Float.toString(yData[Axsis]));
float pcent=(xPce[Axsis]/100);
label.setText(Float.toString(pcent));
}
catch(Exception err){
}
try{
if(y0 >topMargine & y0< h+topMargine)
gten.drawLine(leftMargine,y0,w+leftMargine,y0);
if(Y >topMargine & Y< h+topMargine)
gten.drawLine(leftMargine,Y,w+leftMargine,Y);
if(x0 >leftMargine & x0< w+leftMargine)
gten.drawLine(x0,topMargine,x0,h+topMargine);
if(X >leftMargine & X< w+leftMargine)
&nbs