t.getCaret().moveDot(Math.min(t.getCaret().getDot() + 1, t.getDocument().getEndPosition().getOffset()));
if (t != null) { Caret c = t.getCaret(); int x = c.getMagicCaretPosition().x; int pos = Utilities.getPositionBelow(t, t.getCaretPosition(), x);  if (pos > -1) t.setCaretPosition(pos); } } catch(BadLocationException ble) {
      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()));          }      }