Hi John,
Try the following code.
-------------------
jEditorPane1.addCaretListener(new CaretListener() {
public void caretUpdate(CaretEvent e)
{
jEditorPane1_caretUpdate(e);
}
});
...
...
private void jEditorPane1_caretUpdate(CaretEvent e)
{
System.out.println("\njEditorPane1_caretUpdate(CaretEvent e) called.");
System.out.println(">>" + "location:" + e.getDot() + ";\tthe location of other end of the logical selection:" + e.getMark());
// TODO: Add any handling code here
}