JTextComponent t = getTextComponent(event); if (t != null) { t.getCaret().moveDot(Math.max(t.getCaret().getDot() - 1, t.getDocument().getStartPosition().getOffset())); }
JTextComponent t = getTextComponent(event); try { if (t != null) { Caret c = t.getCaret(); int x = c.getMagicCaretPosition().x; int pos = Utilities.getPositionAbove(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.max(t.getCaret().getDot() - 1,					  t.getDocument().getStartPosition().getOffset()));	  }      }