• Post Reply Bookmark Topic Watch Topic
  • New Topic

TextArea problem  RSS feed

 
prashant gour
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working with text area and having following requirement
1).only 80 char should be in each line.
2). after completion of 80 char caret should move to new line.
3). and one more point if 78th char is space and next word having 5 char so total count of char of line will be more than 80 char so this word should be in next line.

does anyone has done this before. looking for response.
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Didnt you see This ? Its practically the 7th post before yours!
 
prashant gour
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I saw it and did follow all given suggestions but that doesn't work for me.
will you come up with solutions rather than redirecting the post.

i hope, Text area's API are not just enough to do this things. looking for another solution.
 
Jiri Goddard
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
have you read this?: http://java.sun.com/docs/books/tutorial/uiswing/components/text.html

it can give you a good overview what can be done with the text components.
note: if there are text editors where you can set how many characters should a line/row have, then there has to be a way
 
dave taubler
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've got to ask... how is your need different than that you can get by simply turning on line- and word-wrapping in your textarea (and in the constructor, setting it to a width of 80 characters)?

Also, are you working with an AWT TextArea or a Swing JTextArea?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!