I have a button which I can't seem to disable.
The text is set to "WHY?" but the button is not disabled, that's the part I find odd.Code:JButton temp = (JButton)event.getSource();
temp.setText("WHY?");
temp.disable();
Printable View
I have a button which I can't seem to disable.
The text is set to "WHY?" but the button is not disabled, that's the part I find odd.Code:JButton temp = (JButton)event.getSource();
temp.setText("WHY?");
temp.disable();
disable() method is deprecated as of JDK 1.1 and was replaced by
java.awt.Component.setEnabled(boolean)...
try to use temp.setEnabled( boolean b )....
That solved it, thanks for your help!