Solved

Multiline textarea

Posted on 1997-03-23
4
861 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
[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
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
In this post we will learn different types of Android Layout and some basics of an Android App.
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

635 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