lib 1003956 // TinyBrain import prophecy.common.image.BWImage; import prophecy.common.image.Overlay; import prophecy.common.image.ImageSurface; static void tbShowImageAndRects(BWImage img, final L rects) { ImageSurface is = new ImageSurface(img); Overlay overlay = new Overlay { public void paint(ImageSurface imageSurface, Graphics2D g) { for (Rectangle r : unnull(rects)) imageSurface.drawSelectionRect(g, r, Color.blue, Color.white); } }; is.setOverlay(overlay); showFrame(new JScrollPane(is)); }