title: Java JTextArea KeyListener
body: <p>When I pressed the ENTER my JTextArea starts a new row and I only want do to the doClick() method nothing else.
  How should I do that?</p>
  
  <pre><code>textarea.addKeyListener(new KeyListener(){
      @Override
      public void keyPressed(KeyEvent e){
          if(e.getKeyCode() == KeyEvent.VK_ENTER){
          button.doClick();
          }
      }
  
      @Override
      public void keyTyped(KeyEvent e) {
      }
  
      @Override
      public void keyReleased(KeyEvent e) {
      }
  });
  </code></pre>