JTerminal documentation Help

TextArea

The TextArea is similar to TextField, but here several lines can be edited as well as styled text support.

TextAreaComponent textAreaComponent = new TextAreaComponent(); textAreaComponent.text(termString); textAreaComponent.width(80); textAreaComponent.height(6); textAreaComponent.attachScrollBar(Axis.VERTICAL);
textarea example

Methods

Method

Description

boolean editable()

Returns true if the textarea is editable

void editable(boolean)

Sets the editable option

CursorType cursorType()

Returns the cursor type

void cursorType(CursorType)

Sets the cursor type

ScrollBar attachScrollBar(Axis)

Create scrollbar and return it

void detachScrollBar(Axis)

Remove scrollbar

void updateScrollBar()

Updates the scrollbar if present

int cursorChar()

Returns the cursor of character in current line

int cursorLine()

Returns the line cursor

void text(TermString)

Sets the text value

TermString text()

Returns the text value

List<TermString> viewLines()

Returns the currently displayed lines

Events

Event

Description

TextChangedEvent

Event on change of text

Last modified: 01 Juni 2025