Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

alternative to Robot class

898559Nov 30 2011 — edited Dec 6 2011
hi have anyone an idea how can i make screenshoot from my scene without the class robot?

at moment i use the Robot class to make screenshoots from my sceene
Rectangle screenRect = new Rectangle(20,10,800,600);
	    try{
	    	Robot robot = new Robot();
	    	BufferedImage image = robot.createScreenCapture(screenRect);
	    	ImageIO.write(image, "png", new File(fileName));	    	  
	    } catch (AWTException e1) {} 
                      catch (IOException e) {}	    
thats the code to make screenshoots but i think its not good to use AWT
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 3 2012
Added on Nov 30 2011
6 comments
1,271 views