Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JTextArea making non editable  RSS feed

 
selvas kumars
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi floks,
is it possible to make some portion of the text to be
non-editable?
Thanks,
silva.
 
Rick Fortier
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by selvas kumars:
Hi floks,
is it possible to make some portion of the text to be
non-editable?
Thanks,
silva.

It is possible, but you would have to capture all of the keyboard events and when the user tried to edit the portion you wanted read only, you would have to "eat" those keystrokes somehow. I have done this in C++ and C but not java.
This sounds like a bad idea and I think that you are going down the wrong road. Most chat programs have one textarea for display and a different textarea for typing.

[This message has been edited by Rick Fortier (edited June 16, 2001).]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!