I want to filter the key that are pressed on JTextField.
I want that only numbers are allowed, and if other character are pressed it remove it or don't allow the storage on the text field.
I'm thinking to use an addKeyListener, and use the methods: key pressed and key released.
Any Ideas?