insertString(0, "0", new SimpleAttributeSet()); else while (this.getLength() > 1 && this.getText(0, 1).equals("0")) remove(0, 1);
super.insertString(0, "0", new SimpleAttributeSet()); else if (this.getLength() > 1 && this.getText(0, 1).equals("0")) remove(0, 1);
    public void remove(int offs, int len) throws BadLocationException    {        super.remove(offs, len);        if (this.getLength() == 0)            insertString(0, "0", new SimpleAttributeSet());        else            while (this.getLength() > 1 && this.getText(0, 1).equals("0"))                remove(0, 1);    }