Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 458
  • Last Modified:

Java TextArea()

How can I word wrap strings in Java TextArea() object?
0
zorlac77
Asked:
zorlac77
  • 2
1 Solution
 
cini_gmCommented:
setLineWrap(boolean) is used for line wrapping policy of textarea..
 If set to true the lines will be wrapped if they are too long to fit within the allocated width. If set to false, the lines will always be unwrapped.

Syntax.
 textarea.setLineWrap(true);
0
 
objectsCommented:
Just don't use horizontal scrollbars:

new TextArea("", 0, 0, TextArea.SCROLLBARS_VERTICAL_ONLY);
0
 
objectsCommented:
:-)

http://www.objects.com.au
Brainbench MVP for Java 1
http://www.brainbench.com

PS. What did I need to do to get an 'A'?
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now