Read the Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/misc/keybinding.html]How to Use Key Bindings[/url] for background information on why this solution works:
KeyStroke ignore = KeyStroke.getKeyStroke(' ');
textField.getInputMap().put(ignore, "none");