Explain how to add a button in applet.The following are the steps to add a button in applet:
1. Declare and create the object of Button class - Button clickMe; 2. In the method ‘init()’, create the object of the button - clickMe = new Button(“Click Me”); 3. Use the ‘add()’ method – add(clickMe);
|