I have made the JButtons just like Keyboard, which when the user type, then what he/she typed must be displayed on the textfield. And as the user press the keyboard, the colour of keys on the screen should be changed then go back to the original colour when the key is not pressed anymore.
I am sure that I should use keyListener but no matter how i try, i cant seems to make tat buttons change colour.
It will be greate full if anyone explain or show simple codes. Thank you.