@Override public boolean stopCellEditing() { JFormattedTextField ftf = (JFormattedTextField) getComponent(); if (ftf.isEditValid()) { try { ftf.commitEdit(); } catch (java.text.ParseException exc) { // nothing to do } } else { if (!askEditOrRevert(ftf, null)) { return false; } else { ftf.setValue(ftf.getValue()); } } return super.stopCellEditing(); }
@Override public Object getCellEditorValue() { JFormattedTextField ftf = (JFormattedTextField) getComponent(); return ftf.getValue(); }