Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
The moose likes Swing / AWT / SWT and the fly likes How grab image/graphics/capture of what's behind a frame or window? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How grab image/graphics/capture of what Watch "How grab image/graphics/capture of what New topic
Author

How grab image/graphics/capture of what's behind a frame or window?

Dan Bizman
Ranch Hand

Joined: Feb 25, 2003
Posts: 387
I'm trying to make a window that you can see through (and hopefully move around). The problem is that Robot doesn't work when you move the image. Imagine a window like this:



When I use Robot to grab a screen capture to make the inside have the image of what's behind it, there's no problem - until I move it. If I drag it to the right (let's say it moves 1 pixel), then I have to replace the "invisible" part 1-pixel inside the outer border with what was behind the border - which with Robot I can't capture. I can do it if I hide the window, capture it and show it again, but then that causes a horrible and visible flashing which also ruins dragging.

Does anyone have a solution?
 
Have you tried LearnNowOnline? http://www.learnnowonline.com/
 
subject: How grab image/graphics/capture of what's behind a frame or window?