goTo

fun JTextComponent.goTo(line: Int, characterInLine: Int = 0)

Move the caret to the specified line and optional intra-line position. Normalize the positions, to ensure that the document and line limits are not exceeded.

Parameters

line

The 0-based target line.

characterInLine

The 0-based target character position within the line. Defaults to 0.