Solved

Java TextArea()

Posted on 2002-04-29
3
437 Views
Last Modified: 2008-03-10
How can I word wrap strings in Java TextArea() object?
0
Comment
Question by:zorlac77
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Expert Comment

by:cini_gm
ID: 6979701
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
 
LVL 92

Accepted Solution

by:
objects earned 50 total points
ID: 6979736
Just don't use horizontal scrollbars:

new TextArea("", 0, 0, TextArea.SCROLLBARS_VERTICAL_ONLY);
0
 
LVL 92

Expert Comment

by:objects
ID: 6979854
:-)

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
jboss wildfly 10.1 10 619
Notify sent to other threads in Java 9 54
netbeans can not run self signed app 8 38
Pass multiple values or string arrays in java as a parameter 3 73
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question