Meaningless Drivel is fun!
The moose likes Swing / AWT / SWT and the fly likes Robot().createScreenCapture() to capture 2nd monitor? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Robot().createScreenCapture() to capture 2nd monitor?" Watch "Robot().createScreenCapture() to capture 2nd monitor?" New topic

Robot().createScreenCapture() to capture 2nd monitor?

Jon Camilleri
Ranch Hand

Joined: Apr 25, 2008
Posts: 664

This code snippet takes a screenshot of the screen, however it is noted that whilst I have two monitors, the screenshot is only generated for a single screen. Is it possible to modify the program to take a screenshot of both screens, not just my primary monitor?

I am currently using WinXP SP3.

Related links
1. Robot

Darryl Burke

Joined: May 03, 2008
Posts: 5115

Have you read the API for Toolkit#getScreenSize(), which you use in your code? It tells you there how to obtain
Multi-screen aware display dimensions

luck, db
There are no new questions, but there may be new answers.
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2451
Finally, an actual SSCCE was posted with a question

Unfortunately I don't have access to a multimonitor setup so I can't help. Maybe next time.
I agree. Here's the link:
subject: Robot().createScreenCapture() to capture 2nd monitor?
It's not a secret anymore!