Now, you need some way to produce and consume those snapshots. Once you have this information, you can use GraphicsDevice#getBounds to get the physical area of the screen, which you can feed to Robot I could have also used getBounds and tried to figure out where each screen was positioned, but what ever works. GraphicsDevice lstGDs = ge.getScreenDevices() GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment() So, I started by trying to look at the screen resolutions and tried to figure out which screen I wanted. The first thing you need to do though, is get the "area" of the screen you want to capture and this is not as easy it as might sound as Java doesn't seem to provide the "screen names" □ (on Windows GraphicsDevice#getIDstring might return the name, but on MacOS it didn't) You want to use an instance of Robot to capture a snapshot of the screen.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |