I've created a JButton and a Jtextfield in java swing. I want the button to perform the same function as BackSpace key of the keyboard. Is there any means to assign the properties of the the BckSpace key to the button, i.e. inheriting the properties of the key.