title: GWT : print button
body: <p>I am trying to create a button that prints the current browser window.</p>
  
  <p>This is my current code, that uses (or at least it tries to use) JSNI:</p>
  
  <pre><code>private Button print = new Button(constants.print(), new ClickHandler() {
      @Override
      public void onClick(final ClickEvent event) {
          /*-{
              if ($wnd.print) { 
                  $wnd.print(); 
                  return true; 
              } else { 
                  return false; 
              } 
          }-*/
      }           
  });
  </code></pre>
  
  <p>But when I click the button, nothing happens.  It is my first GWT application, so I am not sure about how to implement it.</p>