try thisKeyStroke.getKeyStroke("DELETE");I haven't tested it yet