Adding a KeyListener to a JFrame with buttons.
Hey, I haven't been learning java very long so this may be really easy.
We have a project and it involves inputting and encrypting a message. I don't want to add a keylistener to a JTextbox or anything similar as then the message I input is plainly viewable. I was hoping to be able to simply type when the frame is up and encode the text I type.
This won't seem to work though in the window I want it to work in. It does work when i add the keylistener to an otherwise empty frame. But on the frame with buttons on it it won't work.
Any help? Need to see the code?