How to create TextArea with 80 character-width wide and 10 character-height tall?

Options
- new TextArea(80, 10)
- new TextArea(10, 80)


CORRECT ANSWER : new TextArea(10, 80)

Discussion Board
TextArea

Text field in applet is a white rectangle that can display one line of text. A text field is set up so that the program's user can click on the field and type information, and the applet can then read that information. Our applet has two text fields. Text area is like a text field having more than one line. Its constructor includes more than one argument exactly four arguments that are given as:

TextArea answers = new TextArea(
"I am ready for your first trip.", // Initial text
8, // Number of rows
60, // Number of columns
TextArea.SCROLLBARS_NONE // Do not include scroll bars
);
Text area is used to display the message to the customers and the above text area will be declared as:

new TextArea (10,80) where 80 is the width means rows and height is 10 or columns.

Rohit Sharma 09-30-2014 03:35 PM

Write your comments


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement