/** Save clear of moneyEntry. */ public void clearMoney() { if (moneyField.getDocument() == moneyDocument) { moneyDocument.clear(); } else { moneyField.setText(""); } }
public void setEnabled(boolean isEnabled) { setReadonly(!isEnabled); moneyField.setEditable(isEnabled); if (!isEnabled) { moneyField.setDocument(textDocument); moneyField.setText(""); } else { moneyField.setDocument(moneyDocument); } }