/**
  * Handles the caretPositionChanged event by invoking the caretPositionChanged methods on
  * listener-a and listener-b.
  *
  * @param e the item event
  */
 public void caretPositionChanged(InputMethodEvent e) {
   ((InputMethodListener) a).caretPositionChanged(e);
   ((InputMethodListener) b).caretPositionChanged(e);
 }