Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

maximum allowed character in JTextArea

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

In my application, soon as I enter more than 249 characters in my JTextArea, the buttons stop functioning. I am not sure if its a problem with the actionperformed method of the button, or the number of characters in text area. Also I want to be able to increase number of characters entered in the JTextArea to something close to 1000 characters.
Please suggest.

thanks,
Kavitha.
 
Marshal
Posts: 28271
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's definitely something in your code doing that, since a standard JTextArea isn't limited to 249 characters. But since we can't see any of your code, of course we can't say anything more meaningful than that. Could you post a small and focused example? (I.e. not a whole 600-line class which has a JTextArea and twenty other components.)
 
Kavita Shivani
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the quick response Paul.

Based on your response, I started debugging the action performed method, I am maintaining an already developed application. Interestingly somewhere deep inside the code, while they do 101 other things, they also restrict all the UI input fields to not exceed some max value. If it does, they throw an exception, which is caught in the action performed level as a general exception and swallowed up, not even logged or printed to the console or shown to the user that it exceeded the max characters. .

thanks,
Kavitha.

 
Marshal
Posts: 79532
380
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't think we can understand the problem without seeing some code. And I shall move this thread because it isn't a "beginning" problem.
 
Did you just should on me? You should read this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic