8889909192939495969798
@Override public void keyPressed(KeyEvent e) { if (e.getKeyCode() == KeyEvent.VK_DELETE ) { ((NumberEditor) spinner.getEditor()).getTextField().setText(""); } myTextField.grabFocus(); } }); myTextField.addFocusListener(new FocusListener()