• Post Reply Bookmark Topic Watch Topic
  • New Topic

How would i...

 
Hatem Hassanein
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,
How would I capture the screen and distort it for a couple of seconds then have it return to normal? Kind of like what some screen savers in win98 do. Thanks in advanced.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!