Screenshot widget

This is a Vaadin widget taking client-side screenshots. Here is the demo:

It lets the user to select any screen region (not only in the browser) and sends it back to the server. Here is a server-side usage sample:

win.addComponent(ss = new Screenshot());
ss.addListener(new Screenshot.Listener() {

    public void screenshotReady(
            Screenshot screenshot) {

        // After screenshot is ready, show it


The implementation is based on the AppletIntegration package and I have signed the demo jars with a self-signed certificate. If you plan to use this component in real application, please sign with you a valid certificate.

Again, source code in contrib:
and add-on jar as an attachement.
11226.jar (431 KB)

hi, i m new to vaadin and i wanted to ask something

if i wanted to use the screenshot add on,in my java class i have first to import the screenshot class right?

then add this code :

win.addComponent(ss = new Screenshot());
2ss.addListener(new Screenshot.Listener() {
4 @Override
5 public void screenshotReady(
6 Screenshot screenshot) {
8 // After screenshot is ready, show it
9 image.setSource(screenshot.getScreenshotResource());
10 }

Yes. Import the
. Also, before running the application you have to make sure you have put the add-on jar into WEB-INF/lib folder and recompiled the widgetset. In Eclipse, the plugin introduces a toolbar button for this, but in other environments you need to have an Ant task or similar.

There are general instructions how to use add-ons that might help:

The screenshot-0.9.4.jar file contains an org.vaadin.screenshot.no_image.gif.

I cannot seem to find any reference to it in the source at all.

What purpose does no_image.gif serve?


was only used in Screenshot demo, and should not even be in the package. I consider this as a bug in the packaging script. You can simply ignore (or remove) the file.

I tried this Add-On ( and also JS Screenshot) but ran into some problems. I used a similar code then in the first post but put the takeScreenShot on a buttonClick. When i click the button nothing happens (sometimes a loading indicator appears but that’s it). I also can’t get your demo to work. When i click on the button in your demo also nothing happens.

Is there a problem with the Browser, Vaadin or am i doing something else wrong?

PS: I have the same problem with JS Screenshot.

Don’t know about JS Screenshot, but the screenshot widget uses Java in the browser. If you’ve disabled running Java in the browser (with the recent list of vulnerabilities reported on enabling Java in the browser, many have disabled it), the plugin won’t work.

Hello! Excuse me, why source is not full? where is

Great Post!!! is easy to use. its indeed great for collecting general feedback… Try Now for free!!!