Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

Dan Bizman
Ranch Hand
Posts: 387
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!