Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Jon Camilleri
Ranch Hand
Posts: 664
Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Posts: 5126
11
Java Netbeans IDE Opera
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Rob Camick
Ranch Hand
Posts: 2580
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic