How to preven JButton of generated actions when the user keep pressing down the key or the short cut
The code below to show the issue when the user keep pressing Alt+ O
We want to prevent the JButton from generating multi actions just one action only
A sample of code shows the behaviour which has to be prevented. Continue pressing "Alt +O" and you will see the standard ouptput will print time stampsPlease notice, I am NOT interested in Mouse press which has a solution by adding a threshold ( setMultiClickThreshhold(long threshhold) on the JButton as an attribute.