0

I'm currently writing a script that works inside of a game client, and I want to add screenshot capability to my script. I'm using Robot now, but I would like to be able to take a screenshot of the client even if it is minimized. Is there any way of doing this? If so, how?

I know that this is possible in other languages because I've seen it done in other applications in the past but my worry is that the JVM won't be capable of doing this.

1 Answers1

1

I've never tried it but you should be able to use the Screen Image class. It uses the paint() method of the component so I don't think it matters if the frame is minimized or not. The only thing is you will need to get the image of the content pane not the frame.

camickr
  • 321,443
  • 19
  • 166
  • 288
  • Thanks! This is actually working perfectly! I don't have any idea how this didn't turn up on Google, but I suppose using the keyword "Screenshot" was hurting my chances. Everyone was recommending that you maximize the window, take a screenshot, then minimize the window again. *shudders* – user1426186 Jun 12 '13 at 18:56