JButtons re-enable themselves after being disabled
- by Anarchist
I have an array of JButtons which form a keypad interface. After six numbers are entered I want to disable the keypad so that no further numbers can be entered by the user.
I have written the code and the buttons do disable until the mouse hovers above any of them, then the buttons seem to re-enable themselves and run actionEvents added to them.
The full code is available here.
Possible things that I think are wrong.
There is some sort of MouseListener which is ignoring when I set button.setEnabled(false);
I haven't separated attributes from the buildGUI(); correctly, I only did this anyway so that the inner class could access them.
Possibly something to do with the gridLayout as disabling the buttons seems to work for my services JPanel buttons.