This content originally appeared on DEV Community and was authored by DEV Community
Robot robot=new Robot();
Dimension dimension= Toolkit.getDefaultToolkit().getScreenSize();
Rectangle rectangle=new Rectangle(dimension);
BufferedImage img= robot.createScreenCapture(rectangle);
File f=new File("D://RobotScreenshot1.png");
ImageIO.write(img,"png", f);
I Storing the image in "D://RobotScreenshot1.png" this location.
This content originally appeared on DEV Community and was authored by DEV Community
Print
Share
Comment
Cite
Upload
Translate
Updates
There are no updates yet.
Click the Upload button above to add an update.
APA
MLA
DEV Community | Sciencx (2022-03-04T05:49:54+00:00) Take ScreenShot using Java. Retrieved from https://www.scien.cx/2022/03/04/take-screenshot-using-java/
" » Take ScreenShot using Java." DEV Community | Sciencx - Friday March 4, 2022, https://www.scien.cx/2022/03/04/take-screenshot-using-java/
HARVARDDEV Community | Sciencx Friday March 4, 2022 » Take ScreenShot using Java., viewed ,<https://www.scien.cx/2022/03/04/take-screenshot-using-java/>
VANCOUVERDEV Community | Sciencx - » Take ScreenShot using Java. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/03/04/take-screenshot-using-java/
CHICAGO" » Take ScreenShot using Java." DEV Community | Sciencx - Accessed . https://www.scien.cx/2022/03/04/take-screenshot-using-java/
IEEE" » Take ScreenShot using Java." DEV Community | Sciencx [Online]. Available: https://www.scien.cx/2022/03/04/take-screenshot-using-java/. [Accessed: ]
rf:citation » Take ScreenShot using Java | DEV Community | Sciencx | https://www.scien.cx/2022/03/04/take-screenshot-using-java/ |
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.