Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Adding a KeyListener to a Disabled TextArea
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
mike200015




PostPosted: Sat Apr 14, 2007 9:59 pm   Post subject: 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
Sponsor
Sponsor
Sponsor
sponsor
ericfourfour




PostPosted: Sat Apr 14, 2007 11:53 pm   Post subject: RE:Adding a KeyListener to a Disabled TextArea

Couldn't you just not render the text instead of disabling the text field?
FileFantasy




PostPosted: Sun Apr 15, 2007 8:54 pm   Post subject: 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




PostPosted: Fri Apr 20, 2007 6:51 pm   Post subject: Re: Adding a KeyListener to a Disabled TextArea

Thanks for your help, I managed to figure it out.
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: