public void setInputSource(Component comp){
        synchronized (eventQueue){
            if (component != null){
                component.removeKeyListener(this);
                eventQueue.clear();
                keyStateSet.clear();
            }
            component = comp;
            component.addKeyListener(this);
        }
    }
<code>AwtKeyInput</code>

@author Joshua Slack
@author Kirill Vainer
@version $Revision: 4133 $
jme3-desktop/src/main/java/com/jme3/input/awt/AwtKeyInput.java