Method getCaretPosition()
Return type: int
Member of: javax.swing.text.JTextComponent
[api documentation ] [ main menu]

Examples of how the element is used (one line per example):
[add your own example]

1 getDocument().insertString(getCaretPosition(), text, null);
2 int pos = sourceEditorPane.getCaretPosition();
3 int pos = sourceEditorPane.getCaretPosition();
4 startPos = textArea.getCaretPosition() + 1;
5 int pos = textArea.getCaretPosition();
6 int caretPosition = component.getCaretPosition();
7 startOffset = endOffset = ((JTextField)((PropertiesTableCellEditor)table.getCellEditor(row, column)).getComponent()).getCaretPosition();
8 index = text.indexOf( newSearch, editor.getCaretPosition());
9 scrollRectToVisible(modelToView(getCaretPosition()));
10 int caretPosition = _comboBoxEditor.getCaretPosition();
11 int newCaretPosition = OurMsgJTextPane.getCaretPosition();
Java and J2SE are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other Countries.