(KeyEvent e)
| 40 | |
| 41 | tf.addKeyListener(new KeyAdapter() { |
| 42 | @Override |
| 43 | public void keyPressed(KeyEvent e) { |
| 44 | // public char getKeyChar() |
| 45 | char ch = e.getKeyChar(); |
| 46 | if (!(ch >= KeyEvent.VK_0 && ch <= KeyEvent.VK_9)) { |
| 47 | System.out.println("��������ǣ�" + ch); |
| 48 | e.consume(); |
| 49 | } |
| 50 | } |
| 51 | }); |
| 52 | |
| 53 | // ���ÿɼ� |
nothing calls this directly
no outgoing calls
no test coverage detected