Apr 15, 2002 #1 johnnyv Programmer Jul 13, 2001 216 CA How can I enable or disable a button on an applet depending on the value of x ie x = true or false thanks
How can I enable or disable a button on an applet depending on the value of x ie x = true or false thanks
Apr 15, 2002 #2 mrsnrub Programmer Mar 6, 2002 147 AU Use the Button class's setEnabled method eg. Assuming your button is called 'myButton': if (x) myButton.setEnabled(true); else myButton.setEnabled(false); Hope this helps Upvote 0 Downvote
Use the Button class's setEnabled method eg. Assuming your button is called 'myButton': if (x) myButton.setEnabled(true); else myButton.setEnabled(false); Hope this helps