Solved

Java TextArea()

Posted on 2002-04-29
3
435 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
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 …
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

756 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