954,224 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Taking screenshot with java applet using java robot class not working

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

Thanks sagar.

sagngh8
Newbie Poster
7 posts since May 2011
Reputation Points: 10
Solved Threads: 0
 

Why are you using that to take screenshot. Do you want to take screenshot of the web page or other things. If you just want to take picture of the web page you could use another method. I am not sure what you are doing? Can you explain to me first? Thanks

jingda
Industrious Poster
4,698 posts since Mar 2011
Reputation Points: 182
Solved Threads: 142
 

I am using applet for addressing the problem of platform independent.The java applet can be ran from all system and from all browser wo any problem that's why!

sagngh8
Newbie Poster
7 posts since May 2011
Reputation Points: 10
Solved Threads: 0
 

Sorry i never learn about Java, in fact my knowledge about Programming are limited, the only thing i know is HTml and css and hardware problems. Maybe you should post this in the Java forum

Here is the forum

jingda
Industrious Poster
4,698 posts since Mar 2011
Reputation Points: 182
Solved Threads: 142
 

The Grab Program, located in the Utilities menu, does screen shots and places them into a file that is saved on to the desktop.

RobRussITPro
Newbie Poster
2 posts since Aug 2011
Reputation Points: 16
Solved Threads: 0
 

You can always use command + shift + 3. Hold command, shift and 3 at the same time you can take a screenshot of the whole page you are viewing. If you use 4 instead of 3, you can select the area you want to screenshot. Grab is good but too troublesome.

jingda
Industrious Poster
4,698 posts since Mar 2011
Reputation Points: 182
Solved Threads: 142
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You