mainFrameExample

This small chunk of code is needed to set up the key-listener, it's based on the first answer to this question on Stack Overflow: http://stackoverflow.com/questions/21997130/how-to-use-keylistener-with-jframe.