private void fireKeyEvent(KeyEvent e) {
        super.processKeyEvent(e);
        Object[] listeners = listenerList.getListenerList();
        for (int i = listeners.length - 2; i >= 0; i -= 2) {
            if (listeners[i] == KeyListener.class) {
                KeyListener listener = ((KeyListener) listeners[i + 1]);
                switch (e.getID()) {
                    case KeyEvent.KEY_PRESSED:  listener.keyPressed(e);   break;
                    case KeyEvent.KEY_RELEASED: listener.keyReleased(e);  break;
                    case KeyEvent.KEY_TYPED:    listener.keyTyped(e);     break;
                }
            }
        }
    }