public final int getAnchor ()

taken from field

The anchor of the text selection. The anchor and caretPosition make up the selection range. Selection must always be specified in terms of begin <= end, but anchor may be less than, equal to, or greater than the caretPosition. Depending on how the user selects text, the anchor might represent the lower or upper bound of the selection.