SetSelectionRange Method (JTextComponent)

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 zero-based. Integer.
selectionEnd The end index of the selection. The value is zero-based. Integer.

Examples

textComponent.SetSelectionRange(8, 13)