posted 15 years ago
The javax.swing.Robot class has a createScreenCapture( Rectangle ) method that returns a BufferedImage. You can either capture the whole screen, or just a portion that you want to affect. Manipulate the BufferedImage however you want. Then create a JWindow at the coordinates specified by the Rectangle passed into the createScreenCapture method above. Make an ImageIcon of the BufferedImage, add it to a JLabel, and add the JLabel to the JWindow. Now display the JWindow, and start a Thread that will dispose of the JWindow after some period of time...