Nope. There's no reason to add a key listener to a top level window, and the code you originally posted has the panel add itself as a key listener
this.addKeyListener(this);If I'm reading this...