/** MouseSimulate.java
*
* Created on 2007-5-7, 4:03:04
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.*/packagecn.edu.yutao;importjava.awt.AWTException;importjava.awt.Dimension;importjava.awt.Robot;importjava.awt.Toolkit;importjava.awt.event.InputEvent;importjava.util.Random;/***
*@authorAslan*/publicclassMouseSimulateimplementsRunnable{privatevolatilebooleanisRunning=false;privateRobot robot;privateDimension dim;privateRandom random;publicMouseSimulate() {
random=newRandom();
dim=Toolkit.getDefaultToolkit().getScreenSize();try{
robot=newRobot();
}catch(AWTException e){
e.printStackTrace();
}
}publicvoidrun() {while(isRunning){intx=random.nextInt((int)dim.getWidth());inty=random.nextInt((int)dim.getHeight());
System.out.prin