3 Replies Latest reply: Sep 30, 2009 3:43 AM by 843811 RSS

    Capture Screen by Applet

    843811
      Hi friends

      I wanna take "print screen" of client screen when user will click on the button on applet.. and applet is into somewhere in web-page. and save that captured screen as a image.

      i want to do it without using any certificate or digitally sign...

      I have used following code in swing, it is working fine but for applet it throwing error....

      :::CODE:::

      Robot robot = new Robot();
      BufferedImage screencapture = robot.createScreenCapture(new Rectangle(Toolkit.getDefaultToolkit().getScreenSize()));

      File file = new File("screencapture.jpg");
      ImageIO.write(screencapture, "jpg", file);

      Is there any other way to do the same...
        • 1. Re: Capture Screen by Applet
          843811
          mackOS wrote:
          Hi friends

          I wanna take "print screen" of client screen when user will click on the button on applet.. and applet is into somewhere in web-page. and save that captured screen as a image.
          OK. If I was a user of your Applet I would be pissed off it you did this. Even if you asked for permission from me I would not allow it.

          >
          i want to do it without using any certificate or digitally sign...
          You can't .

          >
          I have used following code in swing, it is working fine but for applet it throwing error....

          :::CODE:::

          Robot robot = new Robot();
          BufferedImage screencapture = robot.createScreenCapture(new Rectangle(Toolkit.getDefaultToolkit().getScreenSize()));

          File file = new File("screencapture.jpg");
          ImageIO.write(screencapture, "jpg", file);

          Is there any other way to do the same...
          No - thank goodness.

          Do you really think it makes security sense for an Applet to be able to do this?
          • 2. Re: Capture Screen by Applet
            843811
            Ok There is a scenario:

            I have to develop a functionality in my web-application that when user will get error page that time user can press button "Report Error" and applet will take the print screen of client screen (error page) and send it to me via mail.

            Is there any way to full fill this maverick idea. i think it can be done by only applet.

            Please help me... if there is anyother way
            • 3. Re: Capture Screen by Applet
              843811
              Get the server to email you a copy of the error page whenever it sends a error page back to the client.