```java
// 添加监视器
private void addActionListenner() {
addStaffOrToy.addActionListener(this);
charge.addActionListener(this);
delStaffOrToy.addActionListener(this);
year.addActionListener(this);
month.addActionListener(this);
searchClassify.addActionListener(this);
search.addActionListener(this);
this.addKeyListener(new KeyListener() {// 为窗口添加键盘事件监听
@Override
public void keyTyped(KeyEvent e) {
// TODO Auto-generated method stub
System.out.println(1);
}
@Override
public void keyReleased(KeyEvent e) {
// TODO Auto-generated method stub
System.out.println(2);
}
@Override
public void keyPressed(KeyEvent e) {
System.out.println(3);
}
});
}
```