支持楼上的
/**
* Returns the zero-based offset of the caret.
*
* Note: The character to the right of the caret will have the
* same index value as the offset (the caret is between
* two characters).
*
* @return the zero-based offset of the caret.
*/
public int getCaretPosition()
/**
* Returns the zero-based offset of the caret.
*
* Note: The character to the right of the caret will have the
* same index value as the offset (the caret is between
* two characters).
*
* @return the zero-based offset of the caret.
*/
public int getCaretPosition()
解决方案 »
- jfreeChart
- 使用domino解密
- 求助 :一个关于内部类的问题 和 强制转型
- 请教赋值问题?
- java树型控件节点可编辑
- 最后10分请教一个超级简单的问题。(关于字符串)(谁答的快谁得分)
- JAVA开发者的高手的QQ群,号码是4338365,群主将定期删除不活跃的人员.
- java.lang.outOfMemoryError是什么错误?
- 请问如何把vfp中的数据转换到sqlserver中,高分,急!!!
- 问题:JList1.addItem(rs.getString(1)),说addItem方法没找到?请大虾告诉我类似上面的
- 搞java安全者请进或搞安全者
- 如何按行来设置JTABLE的背景色?在线给分!急!!!
the position of the text insertion caret for the text component >= 0JTextArea txtField = new JTextArea();
int pos = txtField.getCaretPosition();