my dog learned polymorphism*
The moose likes Applets and the fly likes Taking screenshot with java applet using java robot class not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Taking screenshot with java applet using java robot class not working " Watch "Taking screenshot with java applet using java robot class not working " New topic
Author

Taking screenshot with java applet using java robot class not working

Sagar Singh B
Greenhorn

Joined: Apr 18, 2011
Posts: 6
Hi Everyone,

I am using the java applet to take screenshot of the web browser using the java's robot class.
Robot objRobot = new Robot ();
BufferedImage objBufferedImage = objRobot.createScreenCapture(objRectArea);

The thing work good in windows system taking screenshot but in case of mac osx i get the blank image.When i check the event viewer in mac osx i get the following error.

invalid context
invalid pixel format
CoreAnimation: rendering error 506

The problem is coming for all the browser safari,firefox and chrome.My applet is signed applet.

What might be the reason.An early reply is very valuable.

My machine configuration is as follows.

OS : MAC OSX
Version : 10.6.4







Madhan Sundararajan Devaki
Ranch Hand

Joined: Mar 18, 2011
Posts: 312

I guess, this should boil down to the fact that, JDK for Mac OS has some bugs when it comes to image processing.


S.D. MADHAN
Not many get the right opportunity !
 
Consider Paul's rocket mass heater.
 
subject: Taking screenshot with java applet using java robot class not working
 
Similar Threads
Taking screenshot of JSP page Using java
Auto-Install JAI on a mac
Taking screenshot using java robot class not woring when pc is locked.
Mac OSX Tomcat config
Socket Permissions Problem using Java applet on Windows but not on Mac