Java中Mouse 事件
1 import java.awt.*; 2 import java.awt.event.*; 3 public class MouseJoke{ 4 public static void main(String[] args)throws Exception{ 5 Robot bot = new Robot(); 6 Thread.sleep(10000); 7 for(int i=0;i<20000000;i++){ 8 // 鼠标点击事件 9 bot.mousePress(InputEvent.BUTTON1_MASK);// 按下 10 bot.mouseRelease(InputEvent.BUTTON1_MASK);// 释放 11 } 12 } 13 }