title: Cancel a Keypress Event in GWT
body: <p>I want to cancel a keypress event for a long textbox so that the character newly pressed by the user is not entered in the textbox </p>
  
  <pre><code>longBox_1.addKeyPressHandler(new KeyPressHandler(){
      @Override
      public void onKeyPress(KeyPressEvent event) {
          String Valid="1234567890";
          if (!Valid.contains(String.valueOf(event.getCharCode()))) {
              // the code to cancel the event to be placed here
          }
      }
  });
  </code></pre>