JTextArea


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: JTextArea

  1. #1
    Join Date
    Aug 2005
    Posts
    24

    JTextArea

    Hello,
    How can I restrict JTextArea to allow only 255 Words. Any Suggestions?
    Regards.
    Hasnain.

  2. #2
    Join Date
    Aug 2005
    Posts
    14
    Quote Originally Posted by Hasnain
    Hello,
    How can I restrict JTextArea to allow only 255 Words. Any Suggestions?
    Regards.
    Hasnain.
    Add a listener to the JTextArea. When the text changes get the string and limit as neccessary. Then write the updated length text back to the area.

    I suppose you mean chars and not words although it doesn't really matter.

Similar Threads

  1. JTextArea
    By bilinmiyo in forum Java
    Replies: 1
    Last Post: 03-04-2005, 07:57 AM
  2. JtextArea Problem
    By satish in forum Java
    Replies: 1
    Last Post: 11-16-2001, 11:53 AM
  3. Text selection in a JTextArea
    By Kit in forum Java
    Replies: 1
    Last Post: 02-13-2001, 11:46 AM
  4. Highlighting text in a JTextArea
    By Tom in forum Java
    Replies: 1
    Last Post: 04-28-2000, 02:18 PM
  5. ShowMessageDialog from JTextArea
    By Huiyuanm in forum Java
    Replies: 1
    Last Post: 03-22-2000, 09:03 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center