if (t != null)
try
      public void actionPerformed(ActionEvent event)      {        JTextComponent t = getTextComponent(event);        if (t != null)          {            t.getCaret().moveDot(Math.min(t.getCaret().getDot() + 1,                                          t.getDocument().getEndPosition().getOffset()));          }      }