
-----------------------------------
mike200015
Sat Apr 14, 2007 9:59 pm

Adding a KeyListener to a Disabled TextArea
-----------------------------------
I'm making a typing tutor program, and I want the user to type a passage that it shown in a text area, but I don't want what they're typing to be shown on screen. So I am trying to add a keylistener to the text area that is showing the passage. 
The passage is set so that it is not editable, and also disabled( setEnabled(false)).

Is there a way to do this, nothing I tried has worked?

Thanks,
Mike

-----------------------------------
ericfourfour
Sat Apr 14, 2007 11:53 pm

RE:Adding a KeyListener to a Disabled TextArea
-----------------------------------
Couldn't you just not render the text instead of disabling the text field?

-----------------------------------
FileFantasy
Sun Apr 15, 2007 8:54 pm

RE:Adding a KeyListener to a Disabled TextArea
-----------------------------------
How bout make it so that if getText() of this JTextArea is not nothing, append the text to a StringBuffer, then setText("")? Is that kinda what you want?

-----------------------------------
mike200015
Fri Apr 20, 2007 6:51 pm

Re: Adding a KeyListener to a Disabled TextArea
-----------------------------------
Thanks for your help, I managed to figure it out.
