!752 static int count, max = 20; static int delay = 200; static BufferedImage img, img2; static JWindow window; static JLabel lbl; p-awt { Rectangle r = new Rectangle(35-30, 755-10, 60, 20); // clip to screen Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); r = new Rectangle(screenSize).intersection(r); Robot robot = new Robot(); img = robot.createScreenCapture(r); img2 = changeBrightness(img, 2f); img = changeBrightness(img, 0.5f); // make JWindow window = new JWindow; window.setBounds(r); lbl = new JLabel(new ImageIcon(img2)); window.add(lbl); window.setVisible(true); swingAfter(lbl, delay, r { go(); }); } static void go() { ++count; if (count >= max) window.dispose(); else { lbl.setIcon(new ImageIcon((count & 1) == 0 ? img : img2)); swingAfter(lbl, delay, r { go(); }); } }