static new ThreadLocal screenLens_sleep; static new ThreadLocal screenLens_w; static new ThreadLocal screenLens_h; static ImageSurface screenLens() { final double sleep = optParam(screenLens_sleep, 0.2); final int w = optParam(screenLens_w, 300); final int h = optParam(screenLens_h, 300); ret (ImageSurface) swingAndWait(func { final ImageSurface is = alwaysOnTop(showImage(new RGBImage(w, h, Color.white; hideConsole(; installTimer(is, toMS(sleep), r { Rect r = intersectWithScreen(rectAround(new Pt(mouseLocation()), w, h)); BufferedImage img = shootScreen2(r); is.setImage(img); }); }); }