NumberEditorExt extends DefaultCellEditor { protected boolean hasStrictFormatter() { return useStrictFormatter; } NumberEditorExt();  NumberEditorExt(NumberFormat format);  NumberEditorExt(boolean useStrictFormatter);  NumberEditorExt(NumberFormat format, boolean useStrictFormatter); @Override boolean stopCellEditing(); @Override Component getTableCellEditorComponent(JTable table, Object value,
                                             boolean isSelected,
                                             int row, int column); @Override Number getCellEditorValue(); @Override JFormattedTextField getComponent();  }
@Test public void testStrictIsDefault() { TableCellEditor editor = table.getDefaultEditor(Number.class); assertTrue("sanity: expect NumberEditorExt but was " + editor, editor instanceof NumberEditorExt); assertEquals("default formatter is strict", true, ((NumberEditorExt) editor).hasStrictFormatter()); }