Ejemplo n.º 1
0
 public void keyReleased(KeyEvent E) {
   if (E.getKeyCode() == E.VK_ENTER) {
     if (E.getSource() == yes) {
       dispose();
       server.shutdown();
       return;
     } else if (E.getSource() == cancel) {
       dispose();
       return;
     }
   }
 }
Ejemplo n.º 2
0
  public void keyReleased(KeyEvent E) {
    if (E.getKeyCode() == E.VK_ENTER) {
      if (E.getSource() == dismissButton) {
        dispose();
        return;
      }
    }

    if (E.getKeyCode() == E.VK_TAB) {
      if (E.getSource() == textArea) {
        // Tab out of the text area
        textArea.transferFocus();
        return;
      }
    }
  }