获取鼠标坐标的方法了

终于找到了java中获取当前鼠标坐标的方法了
public static void main(String args[]){
      Point mousepoint = MouseInfo.getPointerInfo().getLocation();
      System.out.println(mousepoint.x+"  "+mousepoint.y);
}

你可能感兴趣的:(java)