title: How to call a method after the space bar is pressed in a JTextArea
body: <p>Sorry for what is likely a simple question, but how can I call a method every time the space bar is pressed in a JTextArea? I have tried attaching a keylistener to the text area, but I wasn't able to get that to work. Thanks.</p>