📜  如何在 java 文本字段中捕获输入键 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:10.902000             🧑  作者: Mango

代码示例1
private void jTextField1KeyPressed(java.awt.event.KeyEvent evt) {
  if(evt.getKeyCode() == KeyEvent.VK_ENTER) {
      // Enter was pressed. Your code goes here.
   }
}