SetSelectionRange Method (JTextComponent)

Class

JTextComponent class

Action

Selects the text within the specified range.

Syntax

textComponent.SetSelectionRange(selectionStart, selectionEnd)
Variable Description
selectionStart The start index of the selection. The value is one-based. INTEGER.
selectionEnd The end index of the selection. The value is one-based. INTEGER.

Examples

TextComponent.SetSelectionRange(8, 13)