t.getCaret().setDot(Math.max(t.getCaret().getDot() - 1, t.getDocument().getStartPosition().getOffset()));
try { int pos = t.getCaret().getDot(); if (pos < t.getDocument().getEndPosition().getOffset()) { t.getDocument().remove(t.getCaret().getDot(), 1); } } catch (BadLocationException e) {  }
      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()));          }      }