private static void checkMouseLocation(){
  PointerInfo info=MouseInfo.getPointerInfo();
  if (info == null) {
    return;
  }
  Point currentLocation=info.getLocation();
  if (lastLocation != null && !lastLocation.equals(currentLocation)) {
    lastMoved=System.currentTimeMillis();
    triggerActivity();
  }
  lastLocation=currentLocation;
}

private static void checkMouseLocation ( ) { PointerInfo info = MouseInfo . getPointerInfo ( ) ; if ( info == null ) { return ; } Point currentLocation = info . getLocation ( ) ; if ( lastLocation != null && ! lastLocation . equals ( currentLocation ) ) { lastMoved = System . currentTimeMillis ( ) ; triggerActivity ( ) ; } lastLocation = currentLocation ; }
check if mouse location has changed from previous check .
