t.getCaret().setDot(Math.max(t.getCaret().getDot() - 1, t.getDocument().getStartPosition().getOffset()));
int offs = t.getCaretPosition() - 1; if (offs >= 0) { Caret c = t.getCaret(); c.setDot(offs);  try { c.setMagicCaretPosition(t.modelToView(offs).getLocation()); } catch (BadLocationException ble) {  } }
      public void actionPerformed(ActionEvent event)      {        JTextComponent t = getTextComponent(event);        if (t != null)          {            t.getCaret().setDot(Math.max(t.getCaret().getDot() - 1,                                         t.getDocument().getStartPosition().getOffset()));          }      }