Java文档中说
getDot()是:Fetches the current position of the caret.
getMark()是:Fetches the current position of the .那么这个dot与Mark又分别代表什么?????A place within a document view that represents where things can be inserted into the document model. A caret has a position in the document referred to as a dot. The dot is where the caret is currently located in the model. There is a second position maintained by the caret that represents the other end of a selection called . If there is no selection the dot and  will be equal. If a selection exists, the two values will be different. The dot can be placed by either calling setDot or moveDot. Setting the dot has the effect of removing any selection that may have previously existed. The dot and  will be equal. Moving the dot has the effect of creating a selection as the  is left at whatever position it previously had.自己看了下Java的docs,现在明白了