Solved

Multiline textarea

Posted on 1997-03-23
4
848 Views
Last Modified: 2006-11-17
I am just getting started with java.

I can't get the textarea to use multiple lines. The 3 rows are displayed but, I am expected an 'enter' key to bring the user to 2nd line.

TextArea ta = new TextArea(5,50);
-this only show a work space but the edited text will not swap to the next line
0
Comment
Question by:lptsang3
4 Comments
 
LVL 2

Expert Comment

by:webster030697
ID: 1218970
That's pretty much how it works (in JDK 1.0.2 anyway). You could write your own TextArea class:

public class MyTextArea extends TextArea
{  //do what you want
}

Have fun!
0
 

Expert Comment

by:dingdang
ID: 1218971
I guess I don't understand the problem. When you are in the first line and press Enter key, you WILL BE in second line.
0
 

Accepted Solution

by:
IsaacW earned 20 total points
ID: 1218972
lptsang3,

use this code:

TextArea tarea;
tarea = new TextArea(columns, rows);
add(tarea);

hope this helps.
0
 

Author Comment

by:lptsang3
ID: 1218973
Edited text of question
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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 will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

705 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now