Java code to disable buttons.
- import java.applet.Applet;
- import java.awt.Button;
-
-
-
-
- public class DisableButtons extends Applet {
- public void init() {
-
-
-
- Button Button1 = new Button("Ok");
- Button Button2 = new Button("Cancel");
- Button Button3 = new Button("Submit");
- Button Button4 = new Button("Reset");
-
-
-
- add(Button1);
- add(Button2);
- add(Button3);
- add(Button4);
-
- Button4.setEnabled(false);
- Button2.setEnabled(false);
- }
- }
Thank you, keep learning and sharing.